import "honnef.co/go/js/dom"
Package dom provides GopherJS bindings for the JavaScript DOM APIs.
This package is an in progress effort of providing idiomatic Go bindings for the DOM, wrapping the JavaScript DOM APIs. The API is neither complete nor frozen yet, but a great amount of the DOM is already useable.
While the package tries to be idiomatic Go, it also tries to stick closely to the JavaScript APIs, so that one does not need to learn a new set of APIs if one is already familiar with it.
One decision that hasn't been made yet is what parts exactly should be part of this package. It is, for example, possible that the canvas APIs will live in a separate package. On the other hand, types such as StorageEvent (the event that gets fired when the HTML5 storage area changes) will be part of this package, simply due to how the DOM is structured – even if the actual storage APIs might live in a separate package. This might require special care to avoid circular dependencies.
The documentation for some of the identifiers is based on the MDN Web Docs by Mozilla Contributors (https://developer.mozilla.org/en-US/docs/Web/API), licensed under CC-BY-SA 2.5 (https://creativecommons.org/licenses/by-sa/2.5/).
The usual entry point of using the dom package is by using the GetWindow() function which will return a Window, from which you can get things such as the current Document.
The DOM has a big amount of different element and event types, but they all follow three interfaces. All functions that work on or return generic elements/events will return one of the three interfaces Element, HTMLElement or Event. In these interface values there will be concrete implementations, such as HTMLParagraphElement or FocusEvent. It's also not unusual that values of type Element also implement HTMLElement. In all cases, type assertions can be used.
Example:
el := dom.GetWindow().Document().QuerySelector(".some-element")
htmlEl := el.(dom.HTMLElement)
pEl := el.(*dom.HTMLParagraphElement)
Several functions in the JavaScript DOM return "live" collections of elements, that is collections that will be automatically updated when elements get removed or added to the DOM. Our bindings, however, return static slices of elements that, once created, will not automatically reflect updates to the DOM. This is primarily done so that slices can actually be used, as opposed to a form of iterator, but also because we think that magically changing data isn't Go's nature and that snapshots of state are a lot easier to reason about.
This does not, however, mean that all objects are snapshots. Elements, events and generally objects that aren't slices or maps are simple wrappers around JavaScript objects, and as such attributes as well as method calls will always return the most current data. To reflect this behaviour, these bindings use pointers to make the semantics clear. Consider the following example:
d := dom.GetWindow().Document()
e1 := d.GetElementByID("my-element")
e2 := d.GetElementByID("my-element")
e1.Class().SetString("some-class")
println(e1.Class().String() == e2.Class().String())
The above example will print `true`.
Some objects in the JS API have two versions of attributes, one that returns a string and one that returns a DOMTokenList to ease manipulation of string-delimited lists. Some other objects only provide DOMTokenList, sometimes DOMSettableTokenList. To simplify these bindings, only the DOMTokenList variant will be made available, by the type TokenList. In cases where the string attribute was the only way to completely replace the value, our TokenList will provide Set([]string) and SetString(string) methods, which will be able to accomplish the same. Additionally, our TokenList will provide methods to convert it to strings and slices.
This package has a relatively stable API. However, there will be backwards incompatible changes from time to time. This is because the package isn't complete yet, as well as because the DOM is a moving target, and APIs do change sometimes.
While an attempt is made to reduce changing function signatures to a minimum, it can't always be guaranteed. Sometimes mistakes in the bindings are found that require changing arguments or return values.
Interfaces defined in this package may also change on a semi-regular basis, as new methods are added to them. This happens because the bindings aren't complete and can never really be, as new features are added to the DOM.
If you depend on none of the APIs changing unexpectedly, you're advised to vendor this package.
const (
DocumentPositionDisconnected = 1
DocumentPositionPreceding = 2
DocumentPositionFollowing = 4
DocumentPositionContains = 8
DocumentPositionContainedBy = 16
DocumentPositionImplementationSpecific = 32
)const (
EvPhaseNone = 0
EvPhaseCapturing = 1
EvPhaseAtTarget = 2
EvPhaseBubbling = 3
)const (
KeyLocationStandard = 0
KeyLocationLeft = 1
KeyLocationRight = 2
KeyLocationNumpad = 3
)const (
DeltaPixel = 0
DeltaLine = 1
DeltaPage = 2
)type AnimationEvent struct{ *BasicEvent }type AudioProcessingEvent struct{ *BasicEvent }Type BasicElement implements the Element interface and is embedded by concrete element types and HTML element types.
func (e *BasicElement) Attributes() map[string]string
func (e *BasicElement) Class() *TokenList
func (e *BasicElement) GetAttribute(name string) string
func (e *BasicElement) GetAttributeNS(ns string, name string) string
func (e *BasicElement) GetBoundingClientRect() ClientRect
func (e *BasicElement) GetElementsByClassName(s string) []Element
func (e *BasicElement) GetElementsByTagName(s string) []Element
func (e *BasicElement) GetElementsByTagNameNS(ns string, name string) []Element
func (e *BasicElement) HasAttribute(s string) bool
func (e *BasicElement) HasAttributeNS(ns string, name string) bool
func (e *BasicElement) ID() string
func (e *BasicElement) InnerHTML() string
func (e *BasicElement) NextElementSibling() Element
func (e *BasicElement) OuterHTML() string
func (e *BasicElement) PreviousElementSibling() Element
func (e *BasicElement) QuerySelector(s string) Element
func (e *BasicElement) QuerySelectorAll(s string) []Element
func (e *BasicElement) RemoveAttribute(s string)
func (e *BasicElement) RemoveAttributeNS(ns string, name string)
func (e *BasicElement) SetAttribute(name string, value string)
func (e *BasicElement) SetAttributeNS(ns string, name string, value string)
func (e *BasicElement) SetClass(s string)
SetClass sets the element's className attribute to s. Consider using the Class method instead.
func (e *BasicElement) SetID(s string)
func (e *BasicElement) SetInnerHTML(s string)
func (e *BasicElement) SetOuterHTML(s string)
func (e *BasicElement) TagName() string
Type BasicEvent implements the Event interface and is embedded by concrete event types.
func CreateEvent(typ string, opts EventOptions) *BasicEvent
func (ev *BasicEvent) Bubbles() bool
func (ev *BasicEvent) Cancelable() bool
func (ev *BasicEvent) CurrentTarget() Element
func (ev *BasicEvent) DefaultPrevented() bool
func (ev *BasicEvent) EventPhase() int
func (ev *BasicEvent) PreventDefault()
func (ev *BasicEvent) StopImmediatePropagation()
func (ev *BasicEvent) StopPropagation()
func (ev *BasicEvent) Target() Element
func (ev *BasicEvent) Timestamp() time.Time
func (ev *BasicEvent) Type() string
func (ev *BasicEvent) Underlying() *js.Object
type BasicHTMLElement struct {
*BasicElement
}Type BasicHTMLElement implements the HTMLElement interface and is embedded by concrete HTML element types.
func (e *BasicHTMLElement) AccessKey() string
func (e *BasicHTMLElement) AccessKeyLabel() string
func (e *BasicHTMLElement) Blur()
func (e *BasicHTMLElement) Click()
func (e *BasicHTMLElement) ContentEditable() string
func (e *BasicHTMLElement) Dataset() map[string]string
func (e *BasicHTMLElement) Dir() string
func (e *BasicHTMLElement) Draggable() bool
func (e *BasicHTMLElement) Focus()
func (e *BasicHTMLElement) IsContentEditable() bool
func (e *BasicHTMLElement) Lang() string
func (e *BasicHTMLElement) OffsetHeight() float64
func (e *BasicHTMLElement) OffsetLeft() float64
func (e *BasicHTMLElement) OffsetParent() HTMLElement
func (e *BasicHTMLElement) OffsetTop() float64
func (e *BasicHTMLElement) OffsetWidth() float64
func (e *BasicHTMLElement) SetAccessKey(s string)
func (e *BasicHTMLElement) SetAccessKeyLabel(s string)
func (e *BasicHTMLElement) SetContentEditable(s string)
func (e *BasicHTMLElement) SetDir(s string)
func (e *BasicHTMLElement) SetDraggable(b bool)
func (e *BasicHTMLElement) SetLang(s string)
func (e *BasicHTMLElement) SetTabIndex(i int)
func (e *BasicHTMLElement) SetTitle(s string)
func (e *BasicHTMLElement) Style() *CSSStyleDeclaration
func (e *BasicHTMLElement) TabIndex() int
func (e *BasicHTMLElement) Title() string
Type BasicNode implements the Node interface and is embedded by concrete node types and element types.
func (n *BasicNode) AddEventListener(typ string, useCapture bool, listener func(Event)) func(*js.Object)
type BeforeInputEvent struct{ *BasicEvent }type BeforeUnloadEvent struct{ *BasicEvent }type BlobEvent struct{ *BasicEvent }type CSSFontFaceLoadEvent struct{ *BasicEvent }func (css *CSSStyleDeclaration) GetPropertyPriority(name string) string
func (css *CSSStyleDeclaration) GetPropertyValue(name string) string
func (css *CSSStyleDeclaration) Index(idx int) string
func (css *CSSStyleDeclaration) Length() int
func (css *CSSStyleDeclaration) RemoveProperty(name string)
func (css *CSSStyleDeclaration) SetProperty(name, value, priority string)
func (css *CSSStyleDeclaration) ToMap() map[string]string
type CSSStyleSheet interface{}CanvasGradient represents an opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.CreateLinearGradient or CanvasRenderingContext2D.CreateRadialGradient.
Reference: https://developer.mozilla.org/en-US/docs/Web/API/CanvasGradient.
func (cg *CanvasGradient) AddColorStop(offset float64, color string)
AddColorStop adds a new stop, defined by an offset and a color, to the gradient. It panics with *js.Error if the offset is not between 0 and 1, or if the color can't be parsed as a CSS <color>.
Reference: https://developer.mozilla.org/en-US/docs/Web/API/CanvasGradient/addColorStop.
CanvasPattern represents an opaque object describing a pattern. It is based on an image, a canvas or a video, created by the CanvasRenderingContext2D.CreatePattern method.
Reference: https://developer.mozilla.org/en-US/docs/Web/API/CanvasPattern.
type CanvasRenderingContext2D struct {
*js.Object
FillStyle string `js:"fillStyle"`
StrokeStyle string `js:"strokeStyle"`
ShadowColor string `js:"shadowColor"`
ShadowBlur int `js:"shadowBlur"`
ShadowOffsetX int `js:"shadowOffsetX"`
ShadowOffsetY int `js:"shadowOffsetY"`
LineCap string `js:"lineCap"`
LineJoin string `js:"lineJoin"`
LineWidth int `js:"lineWidth"`
MiterLimit int `js:"miterLimit"`
Font string `js:"font"`
TextAlign string `js:"textAlign"`
TextBaseline string `js:"textBaseline"`
GlobalAlpha float64 `js:"globalAlpha"`
GlobalCompositeOperation string `js:"globalCompositeOperation"`
}func (ctx *CanvasRenderingContext2D) Arc(x, y, r, sAngle, eAngle float64, counterclockwise bool)
func (ctx *CanvasRenderingContext2D) ArcTo(x1, y1, x2, y2, r float64)
func (ctx *CanvasRenderingContext2D) BeginPath()
func (ctx *CanvasRenderingContext2D) BezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y float64)
func (ctx *CanvasRenderingContext2D) ClearRect(x, y, width, height float64)
func (ctx *CanvasRenderingContext2D) Clip()
func (ctx *CanvasRenderingContext2D) ClosePath()
func (ctx *CanvasRenderingContext2D) CreateImageData(width, height int) *ImageData
func (ctx *CanvasRenderingContext2D) CreateLinearGradient(x0, y0, x1, y1 float64) *CanvasGradient
CreateLinearGradient creates a linear gradient along the line given by the coordinates represented by the parameters.
Reference: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createLinearGradient.
func (ctx *CanvasRenderingContext2D) CreatePattern(image Element, repetition string) *CanvasPattern
CreatePattern creates a pattern using the specified image (a CanvasImageSource). It repeats the source in the directions specified by the repetition argument.
Reference: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createPattern.
func (ctx *CanvasRenderingContext2D) CreateRadialGradient(x0, y0, r0, x1, y1, r1 float64) *CanvasGradient
CreateRadialGradient creates a radial gradient given by the coordinates of the two circles represented by the parameters.
Reference: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createRadialGradient.
func (ctx *CanvasRenderingContext2D) DrawFocusIfNeeded(element HTMLElement, path *js.Object)
func (ctx *CanvasRenderingContext2D) DrawImage(image Element, dx, dy float64)
func (ctx *CanvasRenderingContext2D) DrawImageWithDst(image Element, dx, dy, dWidth, dHeight float64)
func (ctx *CanvasRenderingContext2D) DrawImageWithSrcAndDst(image Element, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight float64)
func (ctx *CanvasRenderingContext2D) Ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle float64, anticlockwise bool)
func (ctx *CanvasRenderingContext2D) Fill()
func (ctx *CanvasRenderingContext2D) FillRect(x, y, width, height float64)
func (ctx *CanvasRenderingContext2D) FillText(text string, x, y, maxWidth float64)
FillText fills a given text at the given (x, y) position. If the optional maxWidth parameter is not -1, the text will be scaled to fit that width.
func (ctx *CanvasRenderingContext2D) GetImageData(sx, sy, sw, sh int) *ImageData
func (ctx *CanvasRenderingContext2D) GetLineDash() []float64
func (ctx *CanvasRenderingContext2D) IsPointInPath(x, y float64) bool
func (ctx *CanvasRenderingContext2D) LineTo(x, y float64)
func (ctx *CanvasRenderingContext2D) MeasureText(text string) *TextMetrics
func (ctx *CanvasRenderingContext2D) MoveTo(x, y float64)
func (ctx *CanvasRenderingContext2D) PutImageData(imageData *ImageData, dx, dy float64)
func (ctx *CanvasRenderingContext2D) PutImageDataDirty(imageData *ImageData, dx, dy float64, dirtyX, dirtyY, dirtyWidth, dirtyHeight int)
func (ctx *CanvasRenderingContext2D) QuadraticCurveTo(cpx, cpy, x, y float64)
func (ctx *CanvasRenderingContext2D) Rect(x, y, width, height float64)
func (ctx *CanvasRenderingContext2D) ResetTransform()
func (ctx *CanvasRenderingContext2D) Restore()
func (ctx *CanvasRenderingContext2D) Rotate(angle float64)
func (ctx *CanvasRenderingContext2D) Save()
func (ctx *CanvasRenderingContext2D) Scale(scaleWidth, scaleHeight float64)
func (ctx *CanvasRenderingContext2D) ScrollPathIntoView(path *js.Object)
func (ctx *CanvasRenderingContext2D) SetLineDash(dashes []float64)
func (ctx *CanvasRenderingContext2D) SetTransform(a, b, c, d, e, f float64)
func (ctx *CanvasRenderingContext2D) Stroke()
func (ctx *CanvasRenderingContext2D) StrokeRect(x, y, width, height float64)
func (ctx *CanvasRenderingContext2D) StrokeText(text string, x, y, maxWidth float64)
StrokeText strokes a given text at the given (x, y) position. If the optional maxWidth parameter is not -1, the text will be scaled to fit that width.
func (ctx *CanvasRenderingContext2D) Transform(a, b, c, d, e, f float64)
func (ctx *CanvasRenderingContext2D) Translate(x, y float64)
type ClientRect struct {
*js.Object
Height float64 `js:"height"`
Width float64 `js:"width"`
Left float64 `js:"left"`
Right float64 `js:"right"`
Top float64 `js:"top"`
Bottom float64 `js:"bottom"`
}type ClipboardEvent struct{ *BasicEvent }type CloseEvent struct {
*BasicEvent
Code int `js:"code"`
Reason string `js:"reason"`
WasClean bool `js:"wasClean"`
}type CompositionEvent struct{ *BasicEvent }type Coordinates struct {
*js.Object
Latitude float64 `js:"latitude"`
Longitude float64 `js:"longitude"`
Altitude float64 `js:"altitude"`
Accuracy float64 `js:"accuracy"`
AltitudeAccuracy float64 `js:"altitudeAccuracy"`
Heading float64 `js:"heading"`
Speed float64 `js:"speed"`
}type CustomEvent struct{ *BasicEvent }type DOMImplementation interface{}type DOMTransactionEvent struct{ *BasicEvent }type DeviceLightEvent struct{ *BasicEvent }type DeviceMotionEvent struct{ *BasicEvent }type DeviceOrientationEvent struct{ *BasicEvent }type DeviceProximityEvent struct{ *BasicEvent }type Document interface {
Node
ParentNode
Async() bool
SetAsync(bool)
Doctype() DocumentType
DocumentElement() Element
DocumentURI() string
Implementation() DOMImplementation
LastStyleSheetSet() string
PreferredStyleSheetSet() string // TODO correct type?
SelectedStyleSheetSet() string // TODO correct type?
StyleSheets() []StyleSheet // TODO s/StyleSheet/Stylesheet/ ?
StyleSheetSets() []StyleSheet // TODO correct type?
AdoptNode(node Node) Node
ImportNode(node Node, deep bool) Node
CreateElement(name string) Element
CreateElementNS(namespace, name string) Element
CreateTextNode(s string) *Text
ElementFromPoint(x, y int) Element
EnableStyleSheetsForSet(name string)
GetElementsByClassName(name string) []Element
GetElementsByTagName(name string) []Element
GetElementsByTagNameNS(ns, name string) []Element
GetElementByID(id string) Element
QuerySelector(sel string) Element
QuerySelectorAll(sel string) []Element
CreateDocumentFragment() DocumentFragment
}type DocumentFragment interface {
Node
ParentNode
QuerySelector(sel string) Element
QuerySelectorAll(sel string) []Element
GetElementByID(id string) Element
}func WrapDocumentFragment(o *js.Object) DocumentFragment
type DocumentType interface{}type DragEvent struct{ *BasicEvent }type EditingBeforeInputEvent struct{ *BasicEvent }type Element interface {
Node
ParentNode
ChildNode
Attributes() map[string]string
Class() *TokenList
ID() string
SetID(string)
TagName() string
GetAttribute(string) string // TODO can attributes only be strings?
GetAttributeNS(ns string, name string) string // can attributes only be strings?
GetBoundingClientRect() ClientRect
GetElementsByClassName(string) []Element
GetElementsByTagName(string) []Element
GetElementsByTagNameNS(ns string, name string) []Element
HasAttribute(string) bool
HasAttributeNS(ns string, name string) bool
QuerySelector(string) Element
QuerySelectorAll(string) []Element
RemoveAttribute(string)
RemoveAttributeNS(ns string, name string)
SetAttribute(name string, value string)
SetAttributeNS(ns string, name string, value string)
InnerHTML() string
SetInnerHTML(string)
OuterHTML() string
SetOuterHTML(string)
}type ErrorEvent struct{ *BasicEvent }type Event interface {
Bubbles() bool
Cancelable() bool
CurrentTarget() Element
DefaultPrevented() bool
EventPhase() int
Target() Element
Timestamp() time.Time
Type() string
PreventDefault()
StopImmediatePropagation()
StopPropagation()
Underlying() *js.Object
}type EventTarget interface {
// AddEventListener adds a new event listener and returns the
// wrapper function it generated. If using RemoveEventListener,
// that wrapper has to be used.
AddEventListener(typ string, useCapture bool, listener func(Event)) func(*js.Object)
RemoveEventListener(typ string, useCapture bool, listener func(*js.Object))
DispatchEvent(event Event) bool
}File represents files as can be obtained from file choosers or drag and drop. The dom package does not define any methods on File nor does it provide access to the blob or a way to read it.
type FocusEvent struct{ *BasicEvent }func (ev *FocusEvent) RelatedTarget() Element
type GamepadEvent struct{ *BasicEvent }type Geolocation interface {
// TODO wrap PositionOptions into something that uses the JS
// object
CurrentPosition(success func(Position), err func(PositionError), opts PositionOptions) Position
WatchPosition(success func(Position), err func(PositionError), opts PositionOptions) int
ClearWatch(int)
}type GlobalEventHandlers interface{}type HTMLAnchorElement struct {
*BasicHTMLElement
*URLUtils
HrefLang string `js:"hreflang"`
Media string `js:"media"`
TabIndex int `js:"tabIndex"`
Target string `js:"target"`
Text string `js:"text"`
Type string `js:"type"`
}func (e *HTMLAnchorElement) Rel() *TokenList
type HTMLAppletElement struct {
*BasicHTMLElement
Alt string `js:"alt"`
Coords string `js:"coords"`
HrefLang string `js:"hreflang"`
Media string `js:"media"`
Search string `js:"search"`
Shape string `js:"shape"`
TabIndex int `js:"tabIndex"`
Target string `js:"target"`
Type string `js:"type"`
}func (e *HTMLAppletElement) Rel() *TokenList
type HTMLAreaElement struct {
*BasicHTMLElement
*URLUtils
Alt string `js:"alt"`
Coords string `js:"coords"`
HrefLang string `js:"hreflang"`
Media string `js:"media"`
Search string `js:"search"`
Shape string `js:"shape"`
TabIndex int `js:"tabIndex"`
Target string `js:"target"`
Type string `js:"type"`
}func (e *HTMLAreaElement) Rel() *TokenList
type HTMLAudioElement struct{ *HTMLMediaElement }type HTMLBRElement struct{ *BasicHTMLElement }type HTMLBaseElement struct{ *BasicHTMLElement }func (e *HTMLBaseElement) Href() string
func (e *HTMLBaseElement) Target() string
type HTMLBodyElement struct{ *BasicHTMLElement }type HTMLButtonElement struct {
*BasicHTMLElement
AutoFocus bool `js:"autofocus"`
Disabled bool `js:"disabled"`
FormAction string `js:"formAction"`
FormEncType string `js:"formEncType"`
FormMethod string `js:"formMethod"`
FormNoValidate bool `js:"formNoValidate"`
FormTarget string `js:"formTarget"`
Name string `js:"name"`
TabIndex int `js:"tabIndex"`
Type string `js:"type"`
ValidationMessage string `js:"validationMessage"`
Value string `js:"value"`
WillValidate bool `js:"willValidate"`
}func (e *HTMLButtonElement) CheckValidity() bool
func (e *HTMLButtonElement) Form() *HTMLFormElement
func (e *HTMLButtonElement) Labels() []*HTMLLabelElement
func (e *HTMLButtonElement) SetCustomValidity(s string)
func (e *HTMLButtonElement) Validity() *ValidityState
type HTMLCanvasElement struct {
*BasicHTMLElement
Height int `js:"height"`
Width int `js:"width"`
}func (e *HTMLCanvasElement) GetContext(param string) *js.Object
func (e *HTMLCanvasElement) GetContext2d() *CanvasRenderingContext2D
type HTMLDListElement struct{ *BasicHTMLElement }type HTMLDataElement struct {
*BasicHTMLElement
Value string `js:"value"`
}type HTMLDataListElement struct{ *BasicHTMLElement }func (e *HTMLDataListElement) Options() []*HTMLOptionElement
type HTMLDirectoryElement struct{ *BasicHTMLElement }type HTMLDivElement struct{ *BasicHTMLElement }type HTMLDocument interface {
Document
ActiveElement() HTMLElement
Body() HTMLElement
Cookie() string
SetCookie(string)
DefaultView() Window
DesignMode() bool
SetDesignMode(bool)
Domain() string
SetDomain(string)
Forms() []*HTMLFormElement
Head() *HTMLHeadElement
Images() []*HTMLImageElement
LastModified() time.Time
Links() []HTMLElement
Location() *Location
Plugins() []*HTMLEmbedElement
ReadyState() string
Referrer() string
Scripts() []*HTMLScriptElement
Title() string
SetTitle(string)
URL() string
}type HTMLElement interface {
Element
GlobalEventHandlers
AccessKey() string
Dataset() map[string]string
SetAccessKey(string)
AccessKeyLabel() string
SetAccessKeyLabel(string)
ContentEditable() string
SetContentEditable(string)
IsContentEditable() bool
Dir() string
SetDir(string)
Draggable() bool
SetDraggable(bool)
Lang() string
SetLang(string)
OffsetHeight() float64
OffsetLeft() float64
OffsetParent() HTMLElement
OffsetTop() float64
OffsetWidth() float64
Style() *CSSStyleDeclaration
Title() string
SetTitle(string)
Blur()
Click()
Focus()
}func WrapHTMLElement(o *js.Object) HTMLElement
type HTMLEmbedElement struct {
*BasicHTMLElement
Src string `js:"src"`
Type string `js:"type"`
Width string `js:"width"`
}type HTMLFieldSetElement struct {
*BasicHTMLElement
Disabled bool `js:"disabled"`
Name string `js:"name"`
Type string `js:"type"`
ValidationMessage string `js:"validationMessage"`
WillValidate bool `js:"willValidate"`
}func (e *HTMLFieldSetElement) CheckValidity() bool
func (e *HTMLFieldSetElement) Elements() []HTMLElement
func (e *HTMLFieldSetElement) Form() *HTMLFormElement
func (e *HTMLFieldSetElement) SetCustomValidity(s string)
func (e *HTMLFieldSetElement) Validity() *ValidityState
type HTMLFontElement struct{ *BasicHTMLElement }type HTMLFormElement struct {
*BasicHTMLElement
AcceptCharset string `js:"acceptCharset"`
Action string `js:"action"`
Autocomplete string `js:"autocomplete"`
Encoding string `js:"encoding"`
Enctype string `js:"enctype"`
Length int `js:"length"`
Method string `js:"method"`
Name string `js:"name"`
NoValidate bool `js:"noValidate"`
Target string `js:"target"`
}func (e *HTMLFormElement) CheckValidity() bool
func (e *HTMLFormElement) Elements() []HTMLElement
func (e *HTMLFormElement) Item(index int) HTMLElement
func (e *HTMLFormElement) NamedItem(name string) HTMLElement
func (e *HTMLFormElement) Reset()
func (e *HTMLFormElement) Submit()
type HTMLFrameElement struct{ *BasicHTMLElement }type HTMLFrameSetElement struct{ *BasicHTMLElement }type HTMLHRElement struct{ *BasicHTMLElement }type HTMLHeadElement struct{ *BasicHTMLElement }type HTMLHeadingElement struct{ *BasicHTMLElement }type HTMLHtmlElement struct{ *BasicHTMLElement }type HTMLIFrameElement struct {
*BasicHTMLElement
Width string `js:"width"`
Height string `js:"height"`
Name string `js:"name"`
Src string `js:"src"`
SrcDoc string `js:"srcdoc"`
Seamless bool `js:"seamless"`
}func (e *HTMLIFrameElement) ContentDocument() Document
func (e *HTMLIFrameElement) ContentWindow() Window
type HTMLImageElement struct {
*BasicHTMLElement
Complete bool `js:"complete"`
CrossOrigin string `js:"crossOrigin"`
Height int `js:"height"`
IsMap bool `js:"isMap"`
NaturalHeight int `js:"naturalHeight"`
NaturalWidth int `js:"naturalWidth"`
Src string `js:"src"`
UseMap string `js:"useMap"`
Width int `js:"width"`
}type HTMLInputElement struct {
*BasicHTMLElement
Accept string `js:"accept"`
Alt string `js:"alt"`
Autocomplete string `js:"autocomplete"`
Autofocus bool `js:"autofocus"`
Checked bool `js:"checked"`
DefaultChecked bool `js:"defaultChecked"`
DefaultValue string `js:"defaultValue"`
DirName string `js:"dirName"`
Disabled bool `js:"disabled"`
FormAction string `js:"formAction"`
FormEncType string `js:"formEncType"`
FormMethod string `js:"formMethod"`
FormNoValidate bool `js:"formNoValidate"`
FormTarget string `js:"formTarget"`
Height string `js:"height"`
Indeterminate bool `js:"indeterminate"`
Max string `js:"max"`
MaxLength int `js:"maxLength"`
Min string `js:"min"`
Multiple bool `js:"multiple"`
Name string `js:"name"`
Pattern string `js:"pattern"`
Placeholder string `js:"placeholder"`
ReadOnly bool `js:"readOnly"`
Required bool `js:"required"`
SelectionDirection string `js:"selectionDirection"`
SelectionEnd int `js:"selectionEnd"`
SelectionStart int `js:"selectionStart"`
Size int `js:"size"`
Src string `js:"src"`
Step string `js:"step"`
TabIndex int `js:"tabIndex"`
Type string `js:"type"`
ValidationMessage string `js:"validationMessage"`
Value string `js:"value"`
ValueAsDate time.Time `js:"valueAsDate"`
ValueAsNumber float64 `js:"valueAsNumber"`
Width string `js:"width"`
WillValidate bool `js:"willValidate"`
}func (e *HTMLInputElement) CheckValidity() bool
func (e *HTMLInputElement) Files() []*File
func (e *HTMLInputElement) Form() *HTMLFormElement
func (e *HTMLInputElement) Labels() []*HTMLLabelElement
func (e *HTMLInputElement) List() *HTMLDataListElement
func (e *HTMLInputElement) Select()
func (e *HTMLInputElement) SetCustomValidity(s string)
func (e *HTMLInputElement) SetSelectionRange(start, end int, direction string)
func (e *HTMLInputElement) StepDown(n int) error
func (e *HTMLInputElement) StepUp(n int) error
func (e *HTMLInputElement) Validity() *ValidityState
type HTMLKeygenElement struct {
*BasicHTMLElement
Autofocus bool `js:"autofocus"`
Challenge string `js:"challenge"`
Disabled bool `js:"disabled"`
Keytype string `js:"keytype"`
Name string `js:"name"`
Type string `js:"type"`
ValidationMessage string `js:"validationMessage"`
WillValidate bool `js:"willValidate"`
}func (e *HTMLKeygenElement) CheckValidity() bool
func (e *HTMLKeygenElement) Form() *HTMLFormElement
func (e *HTMLKeygenElement) Labels() []*HTMLLabelElement
func (e *HTMLKeygenElement) SetCustomValidity(s string)
func (e *HTMLKeygenElement) Validity() *ValidityState
type HTMLLIElement struct {
*BasicHTMLElement
Value int `js:"value"`
}type HTMLLabelElement struct {
*BasicHTMLElement
For string `js:"htmlFor"`
}func (e *HTMLLabelElement) Control() HTMLElement
func (e *HTMLLabelElement) Form() *HTMLFormElement
type HTMLLegendElement struct{ *BasicHTMLElement }func (e *HTMLLegendElement) Form() *HTMLFormElement
type HTMLLinkElement struct {
*BasicHTMLElement
Disabled bool `js:"disabled"`
Href string `js:"href"`
HrefLang string `js:"hrefLang"`
Media string `js:"media"`
Type string `js:"type"`
}func (e *HTMLLinkElement) Rel() *TokenList
func (e *HTMLLinkElement) Sheet() StyleSheet
func (e *HTMLLinkElement) Sizes() *TokenList
type HTMLMapElement struct {
*BasicHTMLElement
Name string `js:"name"`
}func (e *HTMLMapElement) Areas() []*HTMLAreaElement
func (e *HTMLMapElement) Images() []HTMLElement
type HTMLMediaElement struct {
*BasicHTMLElement
Paused bool `js:"paused"`
}func (e *HTMLMediaElement) Pause()
func (e *HTMLMediaElement) Play()
type HTMLMenuElement struct{ *BasicHTMLElement }type HTMLMetaElement struct {
*BasicHTMLElement
Content string `js:"content"`
HTTPEquiv string `js:"httpEquiv"`
Name string `js:"name"`
}type HTMLMeterElement struct {
*BasicHTMLElement
High float64 `js:"high"`
Low float64 `js:"low"`
Max float64 `js:"max"`
Min float64 `js:"min"`
Optimum float64 `js:"optimum"`
}func (e HTMLMeterElement) Labels() []*HTMLLabelElement
type HTMLModElement struct {
*BasicHTMLElement
Cite string `js:"cite"`
DateTime string `js:"dateTime"`
}type HTMLOListElement struct {
*BasicHTMLElement
Reversed bool `js:"reversed"`
Start int `js:"start"`
Type string `js:"type"`
}type HTMLObjectElement struct {
*BasicHTMLElement
Data string `js:"data"`
Height string `js:"height"`
Name string `js:"name"`
TabIndex int `js:"tabIndex"`
Type string `js:"type"`
TypeMustMatch bool `js:"typeMustMatch"`
UseMap string `js:"useMap"`
ValidationMessage string `js:"validationMessage"`
With string `js:"with"`
WillValidate bool `js:"willValidate"`
}func (e *HTMLObjectElement) CheckValidity() bool
func (e *HTMLObjectElement) ContentDocument() Document
func (e *HTMLObjectElement) ContentWindow() Window
func (e *HTMLObjectElement) Form() *HTMLFormElement
func (e *HTMLObjectElement) SetCustomValidity(s string)
func (e *HTMLObjectElement) Validity() *ValidityState
type HTMLOptGroupElement struct {
*BasicHTMLElement
Disabled bool `js:"disabled"`
Label string `js:"label"`
}type HTMLOptionElement struct {
*BasicHTMLElement
DefaultSelected bool `js:"defaultSelected"`
Disabled bool `js:"disabled"`
Index int `js:"index"`
Label string `js:"label"`
Selected bool `js:"selected"`
Text string `js:"text"`
Value string `js:"value"`
}func (e *HTMLOptionElement) Form() *HTMLFormElement
type HTMLOutputElement struct {
*BasicHTMLElement
DefaultValue string `js:"defaultValue"`
Name string `js:"name"`
Type string `js:"type"`
ValidationMessage string `js:"validationMessage"`
Value string `js:"value"`
WillValidate bool `js:"willValidate"`
}func (e *HTMLOutputElement) CheckValidity() bool
func (e *HTMLOutputElement) For() *TokenList
func (e *HTMLOutputElement) Form() *HTMLFormElement
func (e *HTMLOutputElement) Labels() []*HTMLLabelElement
func (e *HTMLOutputElement) SetCustomValidity(s string)
func (e *HTMLOutputElement) Validity() *ValidityState
type HTMLParagraphElement struct{ *BasicHTMLElement }type HTMLParamElement struct {
*BasicHTMLElement
Name string `js:"name"`
Value string `js:"value"`
}type HTMLPreElement struct{ *BasicHTMLElement }type HTMLProgressElement struct {
*BasicHTMLElement
Max float64 `js:"max"`
Position float64 `js:"position"`
Value float64 `js:"value"`
}func (e HTMLProgressElement) Labels() []*HTMLLabelElement
type HTMLQuoteElement struct {
*BasicHTMLElement
Cite string `js:"cite"`
}type HTMLScriptElement struct {
*BasicHTMLElement
Type string `js:"type"`
Src string `js:"src"`
Charset string `js:"charset"`
Async bool `js:"async"`
Defer bool `js:"defer"`
Text string `js:"text"`
}type HTMLSelectElement struct {
*BasicHTMLElement
Autofocus bool `js:"autofocus"`
Disabled bool `js:"disabled"`
Length int `js:"length"`
Multiple bool `js:"multiple"`
Name string `js:"name"`
Required bool `js:"required"`
SelectedIndex int `js:"selectedIndex"`
Size int `js:"size"`
Type string `js:"type"`
ValidationMessage string `js:"validationMessage"`
Value string `js:"value"`
WillValidate bool `js:"willValidate"`
}func (e *HTMLSelectElement) CheckValidity() bool
func (e *HTMLSelectElement) Form() *HTMLFormElement
func (e *HTMLSelectElement) Item(index int) *HTMLOptionElement
func (e *HTMLSelectElement) Labels() []*HTMLLabelElement
func (e *HTMLSelectElement) NamedItem(name string) *HTMLOptionElement
func (e *HTMLSelectElement) Options() []*HTMLOptionElement
func (e *HTMLSelectElement) SelectedOptions() []*HTMLOptionElement
func (e *HTMLSelectElement) SetCustomValidity(s string)
func (e *HTMLSelectElement) Validity() *ValidityState
type HTMLSourceElement struct {
*BasicHTMLElement
Media string `js:"media"`
Src string `js:"src"`
Type string `js:"type"`
}type HTMLSpanElement struct{ *BasicHTMLElement }type HTMLStyleElement struct{ *BasicHTMLElement }type HTMLTableCaptionElement struct{ *BasicHTMLElement }type HTMLTableCellElement struct {
*BasicHTMLElement
ColSpan int `js:"colSpan"`
RowSpan int `js:"rowSpan"`
CellIndex int `js:"cellIndex"`
}type HTMLTableColElement struct {
*BasicHTMLElement
Span int `js:"span"`
}type HTMLTableDataCellElement struct{ *BasicHTMLElement }type HTMLTableElement struct{ *BasicHTMLElement }type HTMLTableHeaderCellElement struct {
*BasicHTMLElement
Abbr string `js:"abbr"`
Scope string `js:"scope"`
}type HTMLTableRowElement struct {
*BasicHTMLElement
RowIndex int `js:"rowIndex"`
SectionRowIndex int `js:"sectionRowIndex"`
}func (e *HTMLTableRowElement) Cells() []*HTMLTableCellElement
func (e *HTMLTableRowElement) DeleteCell(index int)
func (e *HTMLTableRowElement) InsertCell(index int) *HTMLTableCellElement
type HTMLTableSectionElement struct{ *BasicHTMLElement }func (e *HTMLTableSectionElement) DeleteRow(index int)
func (e *HTMLTableSectionElement) InsertRow(index int) *HTMLTableRowElement
func (e *HTMLTableSectionElement) Rows() []*HTMLTableRowElement
type HTMLTextAreaElement struct {
*BasicHTMLElement
Autocomplete string `js:"autocomplete"`
Autofocus bool `js:"autofocus"`
Cols int `js:"cols"`
DefaultValue string `js:"defaultValue"`
DirName string `js:"dirName"`
Disabled bool `js:"disabled"`
MaxLength int `js:"maxLength"`
Name string `js:"name"`
Placeholder string `js:"placeholder"`
ReadOnly bool `js:"readOnly"`
Required bool `js:"required"`
Rows int `js:"rows"`
SelectionDirection string `js:"selectionDirection"`
SelectionStart int `js:"selectionStart"`
SelectionEnd int `js:"selectionEnd"`
TabIndex int `js:"tabIndex"`
TextLength int `js:"textLength"`
Type string `js:"type"`
ValidationMessage string `js:"validationMessage"`
Value string `js:"value"`
WillValidate bool `js:"willValidate"`
Wrap string `js:"wrap"`
}func (e *HTMLTextAreaElement) CheckValidity() bool
func (e *HTMLTextAreaElement) Form() *HTMLFormElement
func (e *HTMLTextAreaElement) Labels() []*HTMLLabelElement
func (e *HTMLTextAreaElement) Select()
func (e *HTMLTextAreaElement) SetCustomValidity(s string)
func (e *HTMLTextAreaElement) SetSelectionRange(start, end int, direction string)
func (e *HTMLTextAreaElement) Validity() *ValidityState
type HTMLTimeElement struct {
*BasicHTMLElement
DateTime string `js:"dateTime"`
}type HTMLTitleElement struct {
*BasicHTMLElement
Text string `js:"text"`
}type HTMLTrackElement struct {
*BasicHTMLElement
Kind string `js:"kind"`
Src string `js:"src"`
Srclang string `js:"srclang"`
Label string `js:"label"`
Default bool `js:"default"`
ReadyState int `js:"readyState"`
}func (e *HTMLTrackElement) Track() *TextTrack
type HTMLUListElement struct{ *BasicHTMLElement }type HTMLUnknownElement struct{ *BasicHTMLElement }type HTMLVideoElement struct{ *HTMLMediaElement }type HashChangeEvent struct{ *BasicEvent }type History interface {
Length() int
State() interface{}
Back()
Forward()
Go(offset int)
PushState(state interface{}, title string, url string)
ReplaceState(state interface{}, title string, url string)
}type IDBVersionChangeEvent struct{ *BasicEvent }type ImageData struct {
*js.Object
Width int `js:"width"`
Height int `js:"height"`
Data *js.Object `js:"data"`
}type KeyboardEvent struct {
*BasicEvent
AltKey bool `js:"altKey"`
CharCode int `js:"charCode"`
CtrlKey bool `js:"ctrlKey"`
Key string `js:"key"`
KeyIdentifier string `js:"keyIdentifier"`
KeyCode int `js:"keyCode"`
Locale string `js:"locale"`
Location int `js:"location"`
KeyLocation int `js:"keyLocation"`
MetaKey bool `js:"metaKey"`
Repeat bool `js:"repeat"`
ShiftKey bool `js:"shiftKey"`
}func (ev *KeyboardEvent) ModifierState(mod string) bool
type MediaStreamEvent struct{ *BasicEvent }type MessageEvent struct {
*BasicEvent
Data *js.Object `js:"data"`
}type MouseEvent struct {
*UIEvent
AltKey bool `js:"altKey"`
Button int `js:"button"`
ClientX int `js:"clientX"`
ClientY int `js:"clientY"`
CtrlKey bool `js:"ctrlKey"`
MetaKey bool `js:"metaKey"`
MovementX int `js:"movementX"`
MovementY int `js:"movementY"`
ScreenX int `js:"screenX"`
ScreenY int `js:"screenY"`
ShiftKey bool `js:"shiftKey"`
}func (ev *MouseEvent) ModifierState(mod string) bool
func (ev *MouseEvent) RelatedTarget() Element
type MutationEvent struct{ *BasicEvent }type Navigator interface {
NavigatorID
NavigatorLanguage
NavigatorOnLine
NavigatorGeolocation
// NavigatorPlugins
// NetworkInformation
() bool
() string
(protocol, uri, title string)
}type NavigatorGeolocation interface {
() Geolocation
}type Node interface {
EventTarget
Underlying() *js.Object
BaseURI() string
ChildNodes() []Node
FirstChild() Node
LastChild() Node
NextSibling() Node
NodeName() string
NodeType() int
NodeValue() string
SetNodeValue(string)
OwnerDocument() Document
ParentNode() Node
ParentElement() Element
PreviousSibling() Node
TextContent() string
SetTextContent(string)
AppendChild(Node)
CloneNode(deep bool) Node
CompareDocumentPosition(Node) int
Contains(Node) bool
HasChildNodes() bool
InsertBefore(which Node, before Node)
IsDefaultNamespace(string) bool
IsEqualNode(Node) bool
LookupPrefix() string
LookupNamespaceURI(string) string
Normalize()
RemoveChild(Node)
ReplaceChild(newChild, oldChild Node)
}type OfflineAudioCompletionEvent struct{ *BasicEvent }type PageTransitionEvent struct{ *BasicEvent }type ParentNode interface {
}type PointerEvent struct{ *BasicEvent }type PopStateEvent struct{ *BasicEvent }type Position struct {
Coords *Coordinates
Timestamp time.Time
}func (err *PositionError) Error() string
type PositionOptions struct {
EnableHighAccuracy bool
Timeout time.Duration
MaximumAge time.Duration
}type ProgressEvent struct{ *BasicEvent }type RTCPeerConnectionIceEvent struct{ *BasicEvent }type RelatedEvent struct{ *BasicEvent }type SVGDocument interface{}type SVGEvent struct{ *BasicEvent }type SVGZoomEvent struct{ *BasicEvent }type Screen struct {
*js.Object
AvailTop int `js:"availTop"`
AvailLeft int `js:"availLeft"`
AvailHeight int `js:"availHeight"`
AvailWidth int `js:"availWidth"`
ColorDepth int `js:"colorDepth"`
Height int `js:"height"`
Left int `js:"left"`
PixelDepth int `js:"pixelDepth"`
Top int `js:"top"`
Width int `js:"width"`
}type Selection interface {
}type SensorEvent struct{ *BasicEvent }type StorageEvent struct{ *BasicEvent }type StyleSheet interface{}type TextMetrics struct {
*js.Object
Width float64 `js:"width"`
ActualBoundingBoxLeft float64 `js:"actualBoundingBoxLeft"`
ActualBoundingBoxRight float64 `js:"actualBoundingBoxRight"`
FontBoundingBoxAscent float64 `js:"fontBoundingBoxAscent"`
FontBoundingBoxDescent float64 `js:"fontBoundingBoxDescent"`
ActualBoundingBoxAscent float64 `js:"actualBoundingBoxAscent"`
ActualBoundingBoxDescent float64 `js:"actualBoundingBoxDescent"`
EmHeightAscent float64 `js:"emHeightAscent"`
EmHeightDescent float64 `js:"emHeightDescent"`
HangingBaseline float64 `js:"hangingBaseline"`
AlphabeticBaseline float64 `js:"alphabeticBaseline"`
IdeographicBaseline float64 `js:"ideographicBaseline"`
}TextTrack represents text track data for <track> elements. It does not currently provide any methods or attributes and it hasn't been decided yet whether they will be added to this package or a separate package.
type TimeEvent struct{ *BasicEvent }Set sets the TokenList's value to the list of tokens in s.
Individual tokens in s shouldn't countain spaces.
SetString sets the TokenList's value to the space-separated list of tokens in s.
type Touch struct {
*js.Object
Identifier int `js:"identifier"`
ScreenX float64 `js:"screenX"`
ScreenY float64 `js:"screenY"`
ClientX float64 `js:"clientX"`
ClientY float64 `js:"clientY"`
PageX float64 `js:"pageX"`
PageY float64 `js:"pageY"`
RadiusX float64 `js:"radiusX"`
RadiusY float64 `js:"radiusY"`
RotationAngle float64 `js:"rotationAngle"`
Force float64 `js:"force"`
}Touch represents a single contact point on a touch-sensitive device. The contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad.
Reference: https://developer.mozilla.org/en-US/docs/Web/API/Touch.
Target returns the Element on which the touch point started when it was first placed on the surface, even if the touch point has since moved outside the interactive area of that element or even been removed from the document.
Reference: https://developer.mozilla.org/en-US/docs/Web/API/Touch/target.
type TouchEvent struct {
*BasicEvent
AltKey bool `js:"altKey"`
CtrlKey bool `js:"ctrlKey"`
MetaKey bool `js:"metaKey"`
ShiftKey bool `js:"shiftKey"`
}TouchEvent represents an event sent when the state of contacts with a touch-sensitive surface changes. This surface can be a touch screen or trackpad, for example. The event can describe one or more points of contact with the screen and includes support for detecting movement, addition and removal of contact points, and so forth.
Reference: https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent.
func (ev *TouchEvent) ChangedTouches() []*Touch
ChangedTouches lists all individual points of contact whose states changed between the previous touch event and this one.
Reference: https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/changedTouches.
func (ev *TouchEvent) TargetTouches() []*Touch
TargetTouches lists all points of contact that are both currently in contact with the touch surface and were also started on the same element that is the target of the event.
Reference: https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/targetTouches.
func (ev *TouchEvent) Touches() []*Touch
Touches lists all current points of contact with the surface, regardless of target or changed status.
Reference: https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/touches.
type TrackEvent struct{ *BasicEvent }type TransitionEvent struct{ *BasicEvent }type UIEvent struct{ *BasicEvent }type URLUtils struct {
*js.Object
Href string `js:"href"`
Protocol string `js:"protocol"`
Host string `js:"host"`
Hostname string `js:"hostname"`
Port string `js:"port"`
Pathname string `js:"pathname"`
Search string `js:"search"`
Hash string `js:"hash"`
Username string `js:"username"`
Password string `js:"password"`
Origin string `js:"origin"`
}type UserProximityEvent struct{ *BasicEvent }type ValidityState struct {
*js.Object
CustomError bool `js:"customError"`
PatternMismatch bool `js:"patternMismatch"`
RangeOverflow bool `js:"rangeOverflow"`
RangeUnderflow bool `js:"rangeUnderflow"`
StepMismatch bool `js:"stepMismatch"`
TooLong bool `js:"tooLong"`
TypeMismatch bool `js:"typeMismatch"`
Valid bool `js:"valid"`
ValueMissing bool `js:"valueMissing"`
}type WheelEvent struct {
*BasicEvent
DeltaX float64 `js:"deltaX"`
DeltaY float64 `js:"deltaY"`
DeltaZ float64 `js:"deltaZ"`
DeltaMode int `js:"deltaMode"`
}type Window interface {
EventTarget
Console() *Console
Document() Document
FrameElement() Element
Location() *Location
Name() string
SetName(string)
InnerHeight() int
InnerWidth() int
Length() int
Opener() Window
OuterHeight() int
OuterWidth() int
ScrollX() int
ScrollY() int
Parent() Window
ScreenX() int
ScreenY() int
ScrollMaxX() int
ScrollMaxY() int
Top() Window
History() History
() Navigator
Screen() *Screen
Alert(string)
Back()
Blur()
CancelAnimationFrame(int)
ClearInterval(int)
ClearTimeout(int)
Close()
Confirm(string) bool
Focus()
Forward()
GetComputedStyle(el Element, pseudoElt string) *CSSStyleDeclaration
GetSelection() Selection
Home()
MoveBy(dx, dy int)
MoveTo(x, y int)
Open(url, name, features string) Window
OpenDialog(url, name, features string, args []interface{}) Window
PostMessage(message string, target string, transfer []interface{})
Print()
Prompt(prompt string, initial string) string
RequestAnimationFrame(callback func(time.Duration)) int
ResizeBy(dw, dh int)
ResizeTo(w, h int)
Scroll(x, y int)
ScrollBy(dx, dy int)
ScrollByLines(int)
ScrollTo(x, y int)
SetCursor(name string)
SetInterval(fn func(), delay int) int
SetTimeout(fn func(), delay int) int
Stop()
}Package dom imports 5 packages (graph) and is imported by 192 packages. Updated 2018-08-01. Refresh now. Tools for package owners.