Documentation ¶
Rendered for js/wasm
Index ¶
- func Alert(message string)
- func Confirm(prompt string) bool
- func QueueMicrotask(fn func())
- func Reload()
- func SetTimeout(fn func(args []js.Value), delay time.Duration, args ...js.Value) int
- type Document
- type Element
- func (e *Element) AddClass(class string)
- func (e *Element) AddEventListener(name string, listener EventListener) js.Func
- func (e *Element) AppendChild(child *Element)
- func (e *Element) Children() []*Element
- func (e *Element) FirstChild() *Element
- func (e *Element) Focus()
- func (e *Element) GetBoundingClientRect() *Rect
- func (e *Element) GetProperty(property string) js.Value
- func (e *Element) InnerText() string
- func (e *Element) InsertBefore(newChild, referenceNode *Element)
- func (e *Element) JSValue() js.Value
- func (e *Element) QuerySelector(query string) *Element
- func (e *Element) QuerySelectorAll(query string) []*Element
- func (e *Element) Remove()
- func (e *Element) RemoveClass(class string)
- func (e *Element) RemoveEventListener(name string, listener js.Func)
- func (e *Element) SetAttribute(prop, value string)
- func (e *Element) SetInnerHTML(contents string)
- func (e *Element) SetInnerText(contents string)
- func (e *Element) SetProperty(property string, value js.Value)
- func (e *Element) SetScrollTop(pixels int)
- func (e *Element) SetStyle(props map[string]interface{})
- func (e *Element) SetValue(value string)
- func (e *Element) ToggleClass(class string)
- func (e *Element) Value() string
- type EventListener
- type Rect
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QueueMicrotask ¶
func QueueMicrotask(fn func())
Types ¶
type Document ¶
type Document struct {
*Element
}
func GetDocument ¶
func GetDocument() *Document
func (*Document) CreateElement ¶
func (*Document) GetElementByID ¶
type Element ¶
type Element struct {
// contains filtered or unexported fields
}
func (*Element) AddEventListener ¶
func (e *Element) AddEventListener(name string, listener EventListener) js.Func
func (*Element) AppendChild ¶
func (*Element) FirstChild ¶
func (*Element) GetBoundingClientRect ¶
func (*Element) InsertBefore ¶
func (*Element) QuerySelector ¶
func (*Element) QuerySelectorAll ¶
func (*Element) RemoveClass ¶
func (*Element) RemoveEventListener ¶
func (*Element) SetAttribute ¶
func (*Element) SetInnerHTML ¶
func (*Element) SetInnerText ¶
func (*Element) SetScrollTop ¶
func (*Element) ToggleClass ¶
type EventListener ¶
Click to show internal directories.
Click to hide internal directories.