Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attr ¶
type Attr interface {
Node
// Properties
OwnerElement() Element
Name() string
Value() string
SetValue(string)
}
Attr implements https://developer.mozilla.org/en-US/docs/Web/API/Attr
type Comment ¶
Comment implements https://developer.mozilla.org/en-US/docs/Web/API/Comment
type Document ¶
type Document interface {
EventTarget
Node
// Properties
Head() Element
Body() Element
Title() string
Doctype() DocumentType
// Methods
CreateElement(string) Element
CreateAttribute(string) Attr
CreateComment(string) Comment
CreateTextNode(string) Text
}
Document implements https://developer.mozilla.org/en-US/docs/Web/API/Document
type DocumentType ¶
type DocumentType interface {
Node
// Properties
Name() string
PublicId() string
SystemId() string
}
Document implements https://developer.mozilla.org/en-US/docs/Web/API/DocumentType
type Element ¶
type Element interface {
EventTarget
Node
// Element properties
TagName() string
ID() string
SetID(string)
OuterHTML() string
InnerHTML() string
SetInnerHTML(string)
// Classes
ClassName() string
SetClassName(string)
ClassList() TokenList
// Attributes
Attributes() []Attr
RemoveAttribute(string)
RemoveAttributeNode(Attr)
SetAttribute(string, string) Attr
SetAttributeNode(Attr) Attr
GetAttributeNames() []string
GetAttribute(string) string
GetAttributeNode(string) Attr
HasAttribute(string) bool
HasAttributes() bool
// Selection Methods
GetElementsByClassName(string) []Element
GetElementsByTagName(string) []Element
QuerySelector(selector string) Element
QuerySelectorAll(selector string) []Element
// DOM Manipulation Methods
Children() []Element
ChildElementCount() int
FirstElementChild() Element
LastElementChild() Element
NextElementSibling() Element
PreviousElementSibling() Element
ReplaceWith(...Node)
Remove()
Prepend(...Node)
// Data sets or gets the value of the element. In general this operates the same
// was as Value() except for specific element types like input elements.
// Radio or checkbox input elements will return a boolean for Data() instead of a string.
Data() any
SetData(any)
// Return the value of the element as a string, or empty string if not applicable
Value() string
SetValue(string)
}
Element implements https://developer.mozilla.org/en-US/docs/Web/API/Element
type Event ¶
Event implements https://developer.mozilla.org/en-US/docs/Web/API/Event
type EventTarget ¶
type EventTarget interface {
AddEventListener(string, func(Event))
RemoveEventListener(string)
DispatchEvent(Event)
}
EventTarget implements https://developer.mozilla.org/en-US/docs/Web/API/EventTarget
type Location ¶
Location implements https://developer.mozilla.org/en-US/docs/Web/API/Location
type Node ¶
type Node interface {
Writer
// Properties
ChildNodes() []Node
Contains(Node) bool
Equals(Node) bool
FirstChild() Node
HasChildNodes() bool
IsConnected() bool
LastChild() Node
NextSibling() Node
NodeName() string
NodeType() NodeType
OwnerDocument() Document
ParentElement() Element
ParentNode() Node
PreviousSibling() Node
TextContent() string
// Methods
AppendChild(Node) Node
InsertBefore(Node, Node) Node
RemoveChild(Node)
// JSValue returns the underlying JavaScript value (WASM only)
JSValue() any
}
Node implements https://developer.mozilla.org/en-US/docs/Web/API/Node
type Style ¶
Style implements https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration
type Text ¶
Text implements https://developer.mozilla.org/en-US/docs/Web/API/Text
type TokenList ¶
type TokenList interface {
// Properties
Length() int
Value() string
// Methods
Values() []string
Contains(string) bool
Add(...string)
Remove(...string)
Toggle(value string, force ...bool) bool
}
TokenList implements https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList
type Window ¶
type Window interface {
EventTarget
// Properties
Document() Document
Location() Location
}
Window implements https://developer.mozilla.org/en-US/docs/Web/API/Window
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
gen-icons
command
gen-icons generates icon_names.go by parsing the icon registry in npm/carbon/icons-generated.js.
|
gen-icons generates icon_names.go by parsing the icon registry in npm/carbon/icons-generated.js. |
|
wasmbuild
command
|
|
|
pkg
|
|
|
mvc
Package mvc provides a thin model-view-controller layer for building declarative WASM user interfaces using the go-wasmbuild DOM wrappers.
|
Package mvc provides a thin model-view-controller layer for building declarative WASM user interfaces using the go-wasmbuild DOM wrappers. |
|
wasm
|
|
|
bart-app
command
|
|
|
bootstrap-app
command
|
|
|
carbon-app
command
|
|
|
helloworld-app
command
|