Web API package for use when compling Go to WASM
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

60 lines
1.4 KiB

// DO NOT EDIT - generated file
package dom
import "syscall/js"
type Node struct {
js.Value
}
func (n *Node) JSValue() js.Value { return n.Value }
func (n *Node) AddEventListener(t string, listener js.Callback) {
n.Call("addEventListener", ToJSValue(t), ToJSValue(listener))
}
func (n *Node) AppendChild(aChild *Element) *Element {
val := n.Call("appendChild", ToJSValue(aChild))
return &Element{Value: val}
}
func (n *Node) GetBaseURI() string {
val := n.Get("baseURI")
return val.String()
}
func (n *Node) GetFirstChild() *Element {
val := n.Get("firstChild")
return &Element{Value: val}
}
func (n *Node) GetLastChild() *Element {
val := n.Get("lastChild")
return &Element{Value: val}
}
func (n *Node) GetNextSibling() *Element {
val := n.Get("nextSibling")
return &Element{Value: val}
}
func (n *Node) GetPreviousSibling() *Element {
val := n.Get("previousSibling")
return &Element{Value: val}
}
func (n *Node) GetParentElement() *Element {
val := n.Get("parentElement")
return &Element{Value: val}
}
func (n *Node) GetRootElement() *Element {
val := n.Get("rootElement")
return &Element{Value: val}
}
func (n *Node) GetPrefix() string {
val := n.Get("prefix")
return val.String()
}
func (n *Node) GetNodeName() string {
val := n.Get("nodeName")
return val.String()
}
func (n *Node) GetTextContent() string {
val := n.Get("textContent")
return val.String()
}
func (n *Node) SetTextContent(v string) {
n.Set("textContent", v)
}