Documentation ¶
Index ¶
- func Attr(k string, v any) *elementAttribute
- func Case(when func() bool, node Node, deps ...vigor.GetterFn) *switchCase
- func Class(v ...any) *elementClass
- func On(ev string, fn JSEventFunc) *elementEvent
- func Property(k string, v any) *elementProperty
- func Style(property string, value any) *elementStyle
- func SubscribedText(fn SubscribedTextFunc) *subscribedText
- type AttributeElementPlugin
- type ChildrenElementPlugin
- type ClassElementPlugin
- type ElEvent
- type ElementPlugin
- type JSEventFunc
- type Node
- func Dynamic(fn func(vigor.Subscriber) Node) Node
- func El(name string, children ...any) Node
- func ErrorBoundary(fallbackFn func(err any) Node, children ...Node) Node
- func For(v any, fn func(i int, v any) Node) Node
- func Index(v vigor.GetterFn, fn func(i int, v any) Node) Node
- func NEl(namespace, name string, children ...any) Node
- func NewNode(domObjectFn func(js.Value) js.Value) Node
- func Portal(node Node) Node
- func Show(when vigor.GetterFn, truthy Node, falsey Node) Node
- func Switch(defaultNode Node, cases ...*switchCase) Node
- func Text(texts ...any) Node
- type PropertyElementPlugin
- type StyleElementPlugin
- type SubscribedTextFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func On ¶
func On(ev string, fn JSEventFunc) *elementEvent
func SubscribedText ¶
func SubscribedText(fn SubscribedTextFunc) *subscribedText
Types ¶
type AttributeElementPlugin ¶
type AttributeElementPlugin struct {
// contains filtered or unexported fields
}
func (*AttributeElementPlugin) HandleChild ¶
func (p *AttributeElementPlugin) HandleChild(child any) (bool, error)
type ChildrenElementPlugin ¶
type ChildrenElementPlugin struct {
// contains filtered or unexported fields
}
func (*ChildrenElementPlugin) HandleChild ¶
func (p *ChildrenElementPlugin) HandleChild(child any) (bool, error)
type ClassElementPlugin ¶
type ClassElementPlugin struct {
// contains filtered or unexported fields
}
func (*ClassElementPlugin) HandleChild ¶
func (p *ClassElementPlugin) HandleChild(child any) (bool, error)
type ElementPlugin ¶
type ElementPlugin interface { HandleChild(child any) (bool, error) Render(doc, obj js.Value) error }
func NewAttributeElementPlugin ¶
func NewAttributeElementPlugin() ElementPlugin
func NewChildrenElementPlugin ¶
func NewChildrenElementPlugin() ElementPlugin
func NewClassElementPlugin ¶
func NewClassElementPlugin() ElementPlugin
func NewPropertyElementPlugin ¶
func NewPropertyElementPlugin() ElementPlugin
func NewStyleElementPlugin ¶
func NewStyleElementPlugin() ElementPlugin
type PropertyElementPlugin ¶
type PropertyElementPlugin struct {
// contains filtered or unexported fields
}
func (*PropertyElementPlugin) HandleChild ¶
func (p *PropertyElementPlugin) HandleChild(child any) (bool, error)
type StyleElementPlugin ¶
type StyleElementPlugin struct {
// contains filtered or unexported fields
}
func (*StyleElementPlugin) HandleChild ¶
func (p *StyleElementPlugin) HandleChild(child any) (bool, error)
type SubscribedTextFunc ¶
type SubscribedTextFunc func(vigor.Subscriber) any
Click to show internal directories.
Click to hide internal directories.