Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Document = &document{ root: &element{ nodeType: DOCUMENT_NODE, }, } )
Functions ¶
func RenderToHTML ¶
Types ¶
type Element ¶
type Element interface {
Node
GetAttributeNames() []string
SetAttribute(k string, v interface{})
GetAttribute(k string) interface{}
RemoveAttribute(k string)
}
Element https://developer.mozilla.org/en-US/docs/Web/API/Element
type ElementList ¶
type ElementList []Element
func (ElementList) Each ¶
func (list ElementList) Each(fn func(n Element))
type Event ¶
type Event interface {
JSObject
Target() EventTarget
PreventDefault()
StopImmediatePropagation()
StopPropagation()
}
Event https://developer.mozilla.org/en-US/docs/Web/API/Event
type EventTarget ¶
type EventTarget interface {
AddEventListener(eventName string, listener func(event Event), args ...interface{})
RemoveEventListener(eventName string, listener func(event Event), args ...interface{})
DispatchEvent(event Event)
}
EventTarget https://developer.mozilla.org/en-US/docs/Web/API/EventTarget
type Node ¶
type Node interface {
JSObject
EventTarget
NodeType() NodeType
NodeName() string
OwnerDocument() Doc
ParentNode() Node
FirstChild() Node
LastChild() Node
PreviousSibling() Node
NextSibling() Node
TextContent() string
SetTextContent(textContent string)
InsertBefore(newChild, referenceNode Node) Node
RemoveChild(n Node) Node
AppendChild(n Node)
}
Click to show internal directories.
Click to hide internal directories.