Documentation ¶
Overview ¶
Package vdom implements a Virtual DOM, as popularized by React.JS.
Virtual DOM nodes can be constructed with VText and VElem, and patches can be generated with the VNode.Diff method. When run in the browser, patches may be applied to the real DOM to update with minimal changes.
See the builder package for convenient helper functions, and the tea package for a higher-level framework for building apps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttrsPatch ¶
type ChildPatch ¶
type EventHandler ¶
N.B. the pointer indirection is so these can be compared.
type EventsPatch ¶
type EventsPatch struct { Add map[string]EventHandler Remove []string }
type ModifyPatch ¶
type ModifyPatch struct { Attrs AttrsPatch Events EventsPatch Children ChildPatch }
func (ModifyPatch) Patch ¶
func (ModifyPatch) Patch(p, n DomNode) DomNode
type ReplacePatch ¶
type ReplacePatch struct {
Replacement VNode
}
func (ReplacePatch) Patch ¶
func (p ReplacePatch) Patch(parent, n DomNode) DomNode
Directories ¶
Path | Synopsis |
---|---|
Package builder provides helpers for constructing VNodes
|
Package builder provides helpers for constructing VNodes |
internal
|
|
Click to show internal directories.
Click to hide internal directories.