feat: replace Handler() method for HTTPServeMux() for better plugin and testing integration; remove via-plugin-picocss dependency from examples; add datastar h.H nodes for data-init, data-effect, and data-ignore-morph; update realtimechart example; other small improvements
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
package h
|
||||
|
||||
import "fmt"
|
||||
|
||||
type OnClickOpts string
|
||||
|
||||
func OnClick(actionid string, opt ...OnClickOpts) H {
|
||||
return Data("on:click", fmt.Sprintf("@get('/_action/%s')", actionid))
|
||||
func DataInit(expression string) H {
|
||||
return Data("init", expression)
|
||||
}
|
||||
|
||||
func DataEffect(expression string) H {
|
||||
return Data("effect", expression)
|
||||
}
|
||||
|
||||
func DataIgnoreMorph() H {
|
||||
return Attr("data-ignore-morph")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user