dom

package
v0.0.0-...-6e88d74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

README

standard is here: https://dom.spec.whatwg.org/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGlobalDOMImplementationJSValue

func GetGlobalDOMImplementationJSValue() js.Value

func IsDOMImplementationSupported

func IsDOMImplementationSupported() bool

Types

type DOMImplementation

type DOMImplementation struct {
	JSValue js.Value
}

func NewDOMImplementationFromJSValue

func NewDOMImplementationFromJSValue(val js.Value) *DOMImplementation

func (*DOMImplementation) CreateDocumentType

func (self *DOMImplementation) CreateDocumentType(qualifiedNameStr string, publicId string, systemId string) *DocumentType

func (*DOMImplementation) CreateHTMLDocument

func (self *DOMImplementation) CreateHTMLDocument(title string) *Document

type Document

type Document struct {
	JSValue js.Value
}

func NewDocumentFromJsValue

func NewDocumentFromJsValue(jsvalue js.Value) *Document

func (*Document) CreateElement

func (self *Document) CreateElement(name string) *Element

func (*Document) CreateElementNS

func (self *Document) CreateElementNS(ns string, name string) *Element

func (*Document) GetBody

func (self *Document) GetBody() *Element

func (*Document) Implementation

func (self *Document) Implementation() *DOMImplementation

func (*Document) NewTextNode

func (self *Document) NewTextNode(text string) *Node

type DocumentType

type DocumentType struct {
	Node
}

func NewDocumentTypeFromJsValue

func NewDocumentTypeFromJsValue(jsvalue js.Value) *DocumentType

type Element

type Element struct {
	Node *Node
}

func (*Element) Append

func (self *Element) Append(node *Node)

func (*Element) AsNode

func (self *Element) AsNode() *Node

func (*Element) ParentElement

func (self *Element) ParentElement() *Element

func (*Element) ParentNode

func (self *Element) ParentNode() *Node

func (*Element) Remove

func (self *Element) Remove()

func (*Element) RemoveChild

func (self *Element) RemoveChild(node *Node)

func (*Element) SetAttribute

func (self *Element) SetAttribute(name string, value string)

func (*Element) SetAttributeNS

func (self *Element) SetAttributeNS(namespace string, name string, value string)

type Node

type Node struct {
	JSValue js.Value
}

func (*Node) AppendChild

func (self *Node) AppendChild(node *Node) *Node

func (*Node) AsNode

func (self *Node) AsNode() *Node

func (*Node) GetFirstChild

func (self *Node) GetFirstChild() *Node

func (*Node) ParentElement

func (self *Node) ParentElement() *Element

func (*Node) ParentNode

func (self *Node) ParentNode() *Node

func (*Node) RemoveAllChildren

func (self *Node) RemoveAllChildren()

func (*Node) RemoveChild

func (self *Node) RemoveChild(c *Node) *Node

type ToNodeConvertable

type ToNodeConvertable interface {
	AsNode() *Node
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL