Documentation
¶
Index ¶
- Variables
- type App
- type DOMElement
- type ElementAttr
- type ElementSpec
- type FuncSpec
- type HasName
- type JSValue
- type ObserverSpec
- type Scope
- func (s *Scope) Assign(targets ...any)
- func (s *Scope) AssignValue(target reflect.Value)
- func (s *Scope) Call(fn any, targets ...any) []reflect.Value
- func (s *Scope) CallValue(fn reflect.Value, targets ...any) []reflect.Value
- func (s Scope) Clone() Scope
- func (s *Scope) Get(t reflect.Type) (ret any, ok bool)
- func (s *Scope) GetValue(t reflect.Type) (ret reflect.Value, ok bool)
- func (s *Scope) Set(t reflect.Type, v any)
- func (s *Scope) SetValue(t reflect.Type, v reflect.Value)
- func (s *Scope) Update(fns ...any)
- type Spec
- type TextSpec
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Global = js.Global() Document = Global.Get("document") )
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Container DOMElement Scope Scope RootSpec Spec Element *DOMElement Spec Spec }
type DOMElement ¶
type DOMElement = JSValue
type ElementSpec ¶
type ElementSpec struct { Tag string Attrs []ElementAttr Children []Spec }
func (ElementSpec) Patch ¶
func (e ElementSpec) Patch( scope Scope, oldSpec Spec, oldElement *DOMElement, replace func(DOMElement), ) ( newElement *DOMElement, newSpec Spec, )
type FuncSpec ¶
type FuncSpec struct { Func any Name string }
func (FuncSpec) Patch ¶
func (f FuncSpec) Patch( scope Scope, oldSpec Spec, oldElement *DOMElement, replace func(DOMElement), ) ( newElement *DOMElement, newSpec Spec, )
type ObserverSpec ¶
func (ObserverSpec) NoChange ¶
func (o ObserverSpec) NoChange(newScope Scope) bool
func (ObserverSpec) Patch ¶
func (o ObserverSpec) Patch( scope Scope, oldSpec Spec, oldElement *DOMElement, replace func(DOMElement), ) ( newElement *DOMElement, newSpec Spec, )
type Spec ¶
type Spec interface { Patch( scope Scope, oldSpec Spec, oldElement *DOMElement, replace func(DOMElement), ) ( newElement *DOMElement, newSpec Spec, ) }
type TextSpec ¶
type TextSpec string
func (TextSpec) Patch ¶
func (t TextSpec) Patch( scope Scope, oldSpec Spec, oldElement *DOMElement, replace func(DOMElement), ) ( newElement *DOMElement, newSpec Spec, )
Click to show internal directories.
Click to hide internal directories.