dom: honnef.co/go/js/dom Index | Files | Directories

package dom

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/).

Getting started

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.

Interfaces

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)

Live collections

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`.

DOMTokenList

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.

Backwards compatibility

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.

Index

Package Files

dom.go events.go

Constants

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 Uses

type AnimationEvent struct{ *BasicEvent }

type AudioProcessingEvent Uses

type AudioProcessingEvent struct{ *BasicEvent }

type BasicElement Uses

type BasicElement struct {
    *BasicNode
}

Type BasicElement implements the Element interface and is embedded by concrete element types and HTML element types.

func (*BasicElement) Attributes Uses

func (e *BasicElement) Attributes() map[string]string

func (*BasicElement) Class Uses

func (e *BasicElement) Class() *TokenList

func (*BasicElement) Closest Uses

func (e *BasicElement) Closest(s string) Element

func (*BasicElement) GetAttribute Uses

func (e *BasicElement) GetAttribute(name string) string

func (*BasicElement) GetAttributeNS Uses

func (e *BasicElement) GetAttributeNS(ns string, name string) string

func (*BasicElement) GetBoundingClientRect Uses

func (e *BasicElement) GetBoundingClientRect() ClientRect

func (*BasicElement) GetElementsByClassName Uses

func (e *BasicElement) GetElementsByClassName(s string) []Element

func (*BasicElement) GetElementsByTagName Uses

func (e *BasicElement) GetElementsByTagName(s string) []Element

func (*BasicElement) GetElementsByTagNameNS Uses

func (e *BasicElement) GetElementsByTagNameNS(ns string, name string) []Element

func (*BasicElement) HasAttribute Uses

func (e *BasicElement) HasAttribute(s string) bool

func (*BasicElement) HasAttributeNS Uses

func (e *BasicElement) HasAttributeNS(ns string, name string) bool

func (*BasicElement) ID Uses

func (e *BasicElement) ID() string

func (*BasicElement) InnerHTML Uses

func (e *BasicElement) InnerHTML() string

func (*BasicElement) Matches Uses

func (e *BasicElement) Matches(s string) bool

func (*BasicElement) NextElementSibling Uses

func (e *BasicElement) NextElementSibling() Element

func (*BasicElement) OuterHTML Uses

func (e *BasicElement) OuterHTML() string

func (*BasicElement) PreviousElementSibling Uses

func (e *BasicElement) PreviousElementSibling() Element

func (*BasicElement) QuerySelector Uses

func (e *BasicElement) QuerySelector(s string) Element

func (*BasicElement) QuerySelectorAll Uses

func (e *BasicElement) QuerySelectorAll(s string) []Element

func (*BasicElement) RemoveAttribute Uses

func (e *BasicElement) RemoveAttribute(s string)

func (*BasicElement) RemoveAttributeNS Uses

func (e *BasicElement) RemoveAttributeNS(ns string, name string)

func (*BasicElement) SetAttribute Uses

func (e *BasicElement) SetAttribute(name string, value string)

func (*BasicElement) SetAttributeNS Uses

func (e *BasicElement) SetAttributeNS(ns string, name string, value string)

func (*BasicElement) SetClass Uses

func (e *BasicElement) SetClass(s string)

SetClass sets the element's className attribute to s. Consider using the Class method instead.

func (*BasicElement) SetID Uses

func (e *BasicElement) SetID(s string)

func (*BasicElement) SetInnerHTML Uses

func (e *BasicElement) SetInnerHTML(s string)

func (*BasicElement) SetOuterHTML Uses

func (e *BasicElement) SetOuterHTML(s string)

func (*BasicElement) TagName Uses

func (e *BasicElement) TagName() string

type BasicEvent Uses

type BasicEvent struct{ *js.Object }

Type BasicEvent implements the Event interface and is embedded by concrete event types.

func CreateEvent Uses

func CreateEvent(typ string, opts EventOptions) *BasicEvent

func (*BasicEvent) Bubbles Uses

func (ev *BasicEvent) Bubbles() bool

func (*BasicEvent) Cancelable Uses

func (ev *BasicEvent) Cancelable() bool

func (*BasicEvent) CurrentTarget Uses

func (ev *BasicEvent) CurrentTarget() Element

func (*BasicEvent) DefaultPrevented Uses

func (ev *BasicEvent) DefaultPrevented() bool

func (*BasicEvent) EventPhase Uses

func (ev *BasicEvent) EventPhase() int

func (*BasicEvent) PreventDefault Uses

func (ev *BasicEvent) PreventDefault()

func (*BasicEvent) StopImmediatePropagation Uses

func (ev *BasicEvent) StopImmediatePropagation()

func (*BasicEvent) StopPropagation Uses

func (ev *BasicEvent) StopPropagation()

func (*BasicEvent) Target Uses

func (ev *BasicEvent) Target() Element

func (*BasicEvent) Timestamp Uses

func (ev *BasicEvent) Timestamp() time.Time

func (*BasicEvent) Type Uses

func (ev *BasicEvent) Type() string

func (*BasicEvent) Underlying Uses

func (ev *BasicEvent) Underlying() *js.Object

type BasicHTMLElement Uses

type BasicHTMLElement struct {
    *BasicElement
}

Type BasicHTMLElement implements the HTMLElement interface and is embedded by concrete HTML element types.

func (*BasicHTMLElement) AccessKey Uses

func (e *BasicHTMLElement) AccessKey() string

func (*BasicHTMLElement) AccessKeyLabel Uses

func (e *BasicHTMLElement) AccessKeyLabel() string

func (*BasicHTMLElement) Blur Uses

func (e *BasicHTMLElement) Blur()

func (*BasicHTMLElement) Click Uses

func (e *BasicHTMLElement) Click()

func (*BasicHTMLElement) ContentEditable Uses

func (e *BasicHTMLElement) ContentEditable() string

func (*BasicHTMLElement) Dataset Uses

func (e *BasicHTMLElement) Dataset() map[string]string

func (*BasicHTMLElement) Dir Uses

func (e *BasicHTMLElement) Dir() string

func (*BasicHTMLElement) Draggable Uses

func (e *BasicHTMLElement) Draggable() bool

func (*BasicHTMLElement) Focus Uses

func (e *BasicHTMLElement) Focus()

func (*BasicHTMLElement) IsContentEditable Uses

func (e *BasicHTMLElement) IsContentEditable() bool

func (*BasicHTMLElement) Lang Uses

func (e *BasicHTMLElement) Lang() string

func (*BasicHTMLElement) OffsetHeight Uses

func (e *BasicHTMLElement) OffsetHeight() float64

func (*BasicHTMLElement) OffsetLeft Uses

func (e *BasicHTMLElement) OffsetLeft() float64

func (*BasicHTMLElement) OffsetParent Uses

func (e *BasicHTMLElement) OffsetParent() HTMLElement

func (*BasicHTMLElement) OffsetTop Uses

func (e *BasicHTMLElement) OffsetTop() float64

func (*BasicHTMLElement) OffsetWidth Uses

func (e *BasicHTMLElement) OffsetWidth() float64

func (*BasicHTMLElement) SetAccessKey Uses

func (e *BasicHTMLElement) SetAccessKey(s string)

func (*BasicHTMLElement) SetAccessKeyLabel Uses

func (e *BasicHTMLElement) SetAccessKeyLabel(s string)

func (*BasicHTMLElement) SetContentEditable Uses

func (e *BasicHTMLElement) SetContentEditable(s string)

func (*BasicHTMLElement) SetDir Uses

func (e *BasicHTMLElement) SetDir(s string)

func (*BasicHTMLElement) SetDraggable Uses

func (e *BasicHTMLElement) SetDraggable(b bool)

func (*BasicHTMLElement) SetLang Uses

func (e *BasicHTMLElement) SetLang(s string)

func (*BasicHTMLElement) SetTabIndex Uses

func (e *BasicHTMLElement) SetTabIndex(i int)

func (*BasicHTMLElement) SetTitle Uses

func (e *BasicHTMLElement) SetTitle(s string)

func (*BasicHTMLElement) Style Uses

func (e *BasicHTMLElement) Style() *CSSStyleDeclaration

func (*BasicHTMLElement) TabIndex Uses

func (e *BasicHTMLElement) TabIndex() int

func (*BasicHTMLElement) Title Uses

func (e *BasicHTMLElement) Title() string

type BasicNode Uses

type BasicNode struct {
    *js.Object
}

Type BasicNode implements the Node interface and is embedded by concrete node types and element types.

func (*BasicNode) AddEventListener Uses

func (n *BasicNode) AddEventListener(typ string, useCapture bool, listener func(Event)) func(*js.Object)

func (*BasicNode) AppendChild Uses

func (n *BasicNode) AppendChild(newchild Node)

func (*BasicNode) BaseURI Uses

func (n *BasicNode) BaseURI() string

func (*BasicNode) ChildNodes Uses

func (n *BasicNode) ChildNodes() []Node

func (*BasicNode) CloneNode Uses

func (n *BasicNode) CloneNode(deep bool) Node

func (*BasicNode) CompareDocumentPosition Uses

func (n *BasicNode) CompareDocumentPosition(other Node) int

func (*BasicNode) Contains Uses

func (n *BasicNode) Contains(other Node) bool

func (*BasicNode) DispatchEvent Uses

func (n *BasicNode) DispatchEvent(event Event) bool

func (*BasicNode) FirstChild Uses

func (n *BasicNode) FirstChild() Node

func (*BasicNode) HasChildNodes Uses

func (n *BasicNode) HasChildNodes() bool

func (*BasicNode) InsertBefore Uses

func (n *BasicNode) InsertBefore(which Node, before Node)

func (*BasicNode) IsDefaultNamespace Uses

func (n *BasicNode) IsDefaultNamespace(s string) bool

func (*BasicNode) IsEqualNode Uses

func (n *BasicNode) IsEqualNode(other Node) bool

func (*BasicNode) LastChild Uses

func (n *BasicNode) LastChild() Node

func (*BasicNode) LookupNamespaceURI Uses

func (n *BasicNode) LookupNamespaceURI(s string) string

func (*BasicNode) LookupPrefix Uses

func (n *BasicNode) LookupPrefix() string

func (*BasicNode) NextSibling Uses

func (n *BasicNode) NextSibling() Node

func (*BasicNode) NodeName Uses

func (n *BasicNode) NodeName() string

func (*BasicNode) NodeType Uses

func (n *BasicNode) NodeType() int

func (*BasicNode) NodeValue Uses

func (n *BasicNode) NodeValue() string

func (*BasicNode) Normalize Uses

func (n *BasicNode) Normalize()

func (*BasicNode) OwnerDocument Uses

func (n *BasicNode) OwnerDocument() Document

func (*BasicNode) ParentElement Uses

func (n *BasicNode) ParentElement() Element

func (*BasicNode) ParentNode Uses

func (n *BasicNode) ParentNode() Node

func (*BasicNode) PreviousSibling Uses

func (n *BasicNode) PreviousSibling() Node

func (*BasicNode) RemoveChild Uses

func (n *BasicNode) RemoveChild(other Node)

func (*BasicNode) RemoveEventListener Uses

func (n *BasicNode) RemoveEventListener(typ string, useCapture bool, listener func(*js.Object))

func (*BasicNode) ReplaceChild Uses

func (n *BasicNode) ReplaceChild(newChild, oldChild Node)

func (*BasicNode) SetNodeValue Uses

func (n *BasicNode) SetNodeValue(s string)

func (*BasicNode) SetTextContent Uses

func (n *BasicNode) SetTextContent(s string)

func (*BasicNode) TextContent Uses

func (n *BasicNode) TextContent() string

func (*BasicNode) Underlying Uses

func (n *BasicNode) Underlying() *js.Object

type BeforeInputEvent Uses

type BeforeInputEvent struct{ *BasicEvent }

type BeforeUnloadEvent Uses

type BeforeUnloadEvent struct{ *BasicEvent }

type BlobEvent Uses

type BlobEvent struct{ *BasicEvent }

type CSSFontFaceLoadEvent Uses

type CSSFontFaceLoadEvent struct{ *BasicEvent }

type CSSStyleDeclaration Uses

type CSSStyleDeclaration struct{ *js.Object }

func (*CSSStyleDeclaration) GetPropertyPriority Uses

func (css *CSSStyleDeclaration) GetPropertyPriority(name string) string

func (*CSSStyleDeclaration) GetPropertyValue Uses

func (css *CSSStyleDeclaration) GetPropertyValue(name string) string

func (*CSSStyleDeclaration) Index Uses

func (css *CSSStyleDeclaration) Index(idx int) string

func (*CSSStyleDeclaration) Length Uses

func (css *CSSStyleDeclaration) Length() int

func (*CSSStyleDeclaration) RemoveProperty Uses

func (css *CSSStyleDeclaration) RemoveProperty(name string)

func (*CSSStyleDeclaration) SetProperty Uses

func (css *CSSStyleDeclaration) SetProperty(name, value, priority string)

func (*CSSStyleDeclaration) ToMap Uses

func (css *CSSStyleDeclaration) ToMap() map[string]string

type CSSStyleSheet Uses

type CSSStyleSheet interface{}

type CanvasGradient Uses

type CanvasGradient struct {
    *js.Object
}

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 (*CanvasGradient) AddColorStop Uses

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.

type CanvasPattern Uses

type CanvasPattern struct {
    *js.Object
}

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 Uses

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 (*CanvasRenderingContext2D) Arc Uses

func (ctx *CanvasRenderingContext2D) Arc(x, y, r, sAngle, eAngle float64, counterclockwise bool)

func (*CanvasRenderingContext2D) ArcTo Uses

func (ctx *CanvasRenderingContext2D) ArcTo(x1, y1, x2, y2, r float64)

func (*CanvasRenderingContext2D) BeginPath Uses

func (ctx *CanvasRenderingContext2D) BeginPath()

func (*CanvasRenderingContext2D) BezierCurveTo Uses

func (ctx *CanvasRenderingContext2D) BezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y float64)

func (*CanvasRenderingContext2D) ClearRect Uses

func (ctx *CanvasRenderingContext2D) ClearRect(x, y, width, height float64)

func (*CanvasRenderingContext2D) Clip Uses

func (ctx *CanvasRenderingContext2D) Clip()

func (*CanvasRenderingContext2D) ClosePath Uses

func (ctx *CanvasRenderingContext2D) ClosePath()

func (*CanvasRenderingContext2D) CreateImageData Uses

func (ctx *CanvasRenderingContext2D) CreateImageData(width, height int) *ImageData

func (*CanvasRenderingContext2D) CreateLinearGradient Uses

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 (*CanvasRenderingContext2D) CreatePattern Uses

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 (*CanvasRenderingContext2D) CreateRadialGradient Uses

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 (*CanvasRenderingContext2D) DrawFocusIfNeeded Uses

func (ctx *CanvasRenderingContext2D) DrawFocusIfNeeded(element HTMLElement, path *js.Object)

func (*CanvasRenderingContext2D) DrawImage Uses

func (ctx *CanvasRenderingContext2D) DrawImage(image Element, dx, dy float64)

func (*CanvasRenderingContext2D) DrawImageWithDst Uses

func (ctx *CanvasRenderingContext2D) DrawImageWithDst(image Element, dx, dy, dWidth, dHeight float64)

func (*CanvasRenderingContext2D) DrawImageWithSrcAndDst Uses

func (ctx *CanvasRenderingContext2D) DrawImageWithSrcAndDst(image Element, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight float64)

func (*CanvasRenderingContext2D) Ellipse Uses

func (ctx *CanvasRenderingContext2D) Ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle float64, anticlockwise bool)

func (*CanvasRenderingContext2D) Fill Uses

func (ctx *CanvasRenderingContext2D) Fill()

func (*CanvasRenderingContext2D) FillRect Uses

func (ctx *CanvasRenderingContext2D) FillRect(x, y, width, height float64)

func (*CanvasRenderingContext2D) FillText Uses

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 (*CanvasRenderingContext2D) GetImageData Uses

func (ctx *CanvasRenderingContext2D) GetImageData(sx, sy, sw, sh int) *ImageData

func (*CanvasRenderingContext2D) GetLineDash Uses

func (ctx *CanvasRenderingContext2D) GetLineDash() []float64

func (*CanvasRenderingContext2D) IsPointInPath Uses

func (ctx *CanvasRenderingContext2D) IsPointInPath(x, y float64) bool

func (*CanvasRenderingContext2D) IsPointInStroke Uses

func (ctx *CanvasRenderingContext2D) IsPointInStroke(path *js.Object, x, y float64) bool

func (*CanvasRenderingContext2D) LineTo Uses

func (ctx *CanvasRenderingContext2D) LineTo(x, y float64)

func (*CanvasRenderingContext2D) MeasureText Uses

func (ctx *CanvasRenderingContext2D) MeasureText(text string) *TextMetrics

func (*CanvasRenderingContext2D) MoveTo Uses

func (ctx *CanvasRenderingContext2D) MoveTo(x, y float64)

func (*CanvasRenderingContext2D) PutImageData Uses

func (ctx *CanvasRenderingContext2D) PutImageData(imageData *ImageData, dx, dy float64)

func (*CanvasRenderingContext2D) PutImageDataDirty Uses

func (ctx *CanvasRenderingContext2D) PutImageDataDirty(imageData *ImageData, dx, dy float64, dirtyX, dirtyY, dirtyWidth, dirtyHeight int)

func (*CanvasRenderingContext2D) QuadraticCurveTo Uses

func (ctx *CanvasRenderingContext2D) QuadraticCurveTo(cpx, cpy, x, y float64)

func (*CanvasRenderingContext2D) Rect Uses

func (ctx *CanvasRenderingContext2D) Rect(x, y, width, height float64)

func (*CanvasRenderingContext2D) ResetTransform Uses

func (ctx *CanvasRenderingContext2D) ResetTransform()

func (*CanvasRenderingContext2D) Restore Uses

func (ctx *CanvasRenderingContext2D) Restore()

func (*CanvasRenderingContext2D) Rotate Uses

func (ctx *CanvasRenderingContext2D) Rotate(angle float64)

func (*CanvasRenderingContext2D) Save Uses

func (ctx *CanvasRenderingContext2D) Save()

func (*CanvasRenderingContext2D) Scale Uses

func (ctx *CanvasRenderingContext2D) Scale(scaleWidth, scaleHeight float64)

func (*CanvasRenderingContext2D) ScrollPathIntoView Uses

func (ctx *CanvasRenderingContext2D) ScrollPathIntoView(path *js.Object)

func (*CanvasRenderingContext2D) SetLineDash Uses

func (ctx *CanvasRenderingContext2D) SetLineDash(dashes []float64)

func (*CanvasRenderingContext2D) SetTransform Uses

func (ctx *CanvasRenderingContext2D) SetTransform(a, b, c, d, e, f float64)

func (*CanvasRenderingContext2D) Stroke Uses

func (ctx *CanvasRenderingContext2D) Stroke()

func (*CanvasRenderingContext2D) StrokeRect Uses

func (ctx *CanvasRenderingContext2D) StrokeRect(x, y, width, height float64)

func (*CanvasRenderingContext2D) StrokeText Uses

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 (*CanvasRenderingContext2D) Transform Uses

func (ctx *CanvasRenderingContext2D) Transform(a, b, c, d, e, f float64)

func (*CanvasRenderingContext2D) Translate Uses

func (ctx *CanvasRenderingContext2D) Translate(x, y float64)

type ChildNode Uses

type ChildNode interface {
    PreviousElementSibling() Element
    NextElementSibling() Element
}

type ClientRect Uses

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 Uses

type ClipboardEvent struct{ *BasicEvent }

type CloseEvent Uses

type CloseEvent struct {
    *BasicEvent
    Code     int    `js:"code"`
    Reason   string `js:"reason"`
    WasClean bool   `js:"wasClean"`
}

type CompositionEvent Uses

type CompositionEvent struct{ *BasicEvent }

type Console Uses

type Console struct {
    *js.Object
}

type Coordinates Uses

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 Uses

type CustomEvent struct{ *BasicEvent }

type DOMImplementation Uses

type DOMImplementation interface{}

type DOMTransactionEvent Uses

type DOMTransactionEvent struct{ *BasicEvent }

type DeviceLightEvent Uses

type DeviceLightEvent struct{ *BasicEvent }

type DeviceMotionEvent Uses

type DeviceMotionEvent struct{ *BasicEvent }

type DeviceOrientationEvent Uses

type DeviceOrientationEvent struct{ *BasicEvent }

type DeviceProximityEvent Uses

type DeviceProximityEvent struct{ *BasicEvent }

type Document Uses

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
}

func WrapDocument Uses

func WrapDocument(o *js.Object) Document

type DocumentFragment Uses

type DocumentFragment interface {
    Node
    ParentNode
    QuerySelector(sel string) Element
    QuerySelectorAll(sel string) []Element
    GetElementByID(id string) Element
}

func WrapDocumentFragment Uses

func WrapDocumentFragment(o *js.Object) DocumentFragment

type DocumentType Uses

type DocumentType interface{}

type DragEvent Uses

type DragEvent struct{ *BasicEvent }

type EditingBeforeInputEvent Uses

type EditingBeforeInputEvent struct{ *BasicEvent }

type Element Uses

type Element interface {
    Node
    ParentNode
    ChildNode

    Attributes() map[string]string
    Class() *TokenList
    Closest(string) Element
    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
    Matches(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)
}

func WrapElement Uses

func WrapElement(o *js.Object) Element

type ErrorEvent Uses

type ErrorEvent struct{ *BasicEvent }

type Event Uses

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
}

func WrapEvent Uses

func WrapEvent(o *js.Object) Event

type EventOptions Uses

type EventOptions struct {
    Bubbles    bool
    Cancelable bool
}

type EventTarget Uses

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
}

type File Uses

type File struct {
    *js.Object
}

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 Uses

type FocusEvent struct{ *BasicEvent }

func (*FocusEvent) RelatedTarget Uses

func (ev *FocusEvent) RelatedTarget() Element

type GamepadEvent Uses

type GamepadEvent struct{ *BasicEvent }

type Geolocation Uses

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 Uses

type GlobalEventHandlers interface{}

type HTMLAnchorElement Uses

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 (*HTMLAnchorElement) Rel Uses

func (e *HTMLAnchorElement) Rel() *TokenList

type HTMLAppletElement Uses

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 (*HTMLAppletElement) Rel Uses

func (e *HTMLAppletElement) Rel() *TokenList

type HTMLAreaElement Uses

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 (*HTMLAreaElement) Rel Uses

func (e *HTMLAreaElement) Rel() *TokenList

type HTMLAudioElement Uses

type HTMLAudioElement struct{ *HTMLMediaElement }

type HTMLBRElement Uses

type HTMLBRElement struct{ *BasicHTMLElement }

type HTMLBaseElement Uses

type HTMLBaseElement struct{ *BasicHTMLElement }

func (*HTMLBaseElement) Href Uses

func (e *HTMLBaseElement) Href() string

func (*HTMLBaseElement) Target Uses

func (e *HTMLBaseElement) Target() string

type HTMLBodyElement Uses

type HTMLBodyElement struct{ *BasicHTMLElement }

type HTMLButtonElement Uses

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 (*HTMLButtonElement) CheckValidity Uses

func (e *HTMLButtonElement) CheckValidity() bool

func (*HTMLButtonElement) Form Uses

func (e *HTMLButtonElement) Form() *HTMLFormElement

func (*HTMLButtonElement) Labels Uses

func (e *HTMLButtonElement) Labels() []*HTMLLabelElement

func (*HTMLButtonElement) SetCustomValidity Uses

func (e *HTMLButtonElement) SetCustomValidity(s string)

func (*HTMLButtonElement) Validity Uses

func (e *HTMLButtonElement) Validity() *ValidityState

type HTMLCanvasElement Uses

type HTMLCanvasElement struct {
    *BasicHTMLElement
    Height int `js:"height"`
    Width  int `js:"width"`
}

func (*HTMLCanvasElement) GetContext Uses

func (e *HTMLCanvasElement) GetContext(param string) *js.Object

func (*HTMLCanvasElement) GetContext2d Uses

func (e *HTMLCanvasElement) GetContext2d() *CanvasRenderingContext2D

type HTMLDListElement Uses

type HTMLDListElement struct{ *BasicHTMLElement }

type HTMLDataElement Uses

type HTMLDataElement struct {
    *BasicHTMLElement
    Value string `js:"value"`
}

type HTMLDataListElement Uses

type HTMLDataListElement struct{ *BasicHTMLElement }

func (*HTMLDataListElement) Options Uses

func (e *HTMLDataListElement) Options() []*HTMLOptionElement

type HTMLDirectoryElement Uses

type HTMLDirectoryElement struct{ *BasicHTMLElement }

type HTMLDivElement Uses

type HTMLDivElement struct{ *BasicHTMLElement }

type HTMLDocument Uses

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 Uses

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 Uses

func WrapHTMLElement(o *js.Object) HTMLElement

type HTMLEmbedElement Uses

type HTMLEmbedElement struct {
    *BasicHTMLElement
    Src   string `js:"src"`
    Type  string `js:"type"`
    Width string `js:"width"`
}

type HTMLFieldSetElement Uses

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 (*HTMLFieldSetElement) CheckValidity Uses

func (e *HTMLFieldSetElement) CheckValidity() bool

func (*HTMLFieldSetElement) Elements Uses

func (e *HTMLFieldSetElement) Elements() []HTMLElement

func (*HTMLFieldSetElement) Form Uses

func (e *HTMLFieldSetElement) Form() *HTMLFormElement

func (*HTMLFieldSetElement) SetCustomValidity Uses

func (e *HTMLFieldSetElement) SetCustomValidity(s string)

func (*HTMLFieldSetElement) Validity Uses

func (e *HTMLFieldSetElement) Validity() *ValidityState

type HTMLFontElement Uses

type HTMLFontElement struct{ *BasicHTMLElement }

type HTMLFormElement Uses

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 (*HTMLFormElement) CheckValidity Uses

func (e *HTMLFormElement) CheckValidity() bool

func (*HTMLFormElement) Elements Uses

func (e *HTMLFormElement) Elements() []HTMLElement

func (*HTMLFormElement) Item Uses

func (e *HTMLFormElement) Item(index int) HTMLElement

func (*HTMLFormElement) NamedItem Uses

func (e *HTMLFormElement) NamedItem(name string) HTMLElement

func (*HTMLFormElement) Reset Uses

func (e *HTMLFormElement) Reset()

func (*HTMLFormElement) Submit Uses

func (e *HTMLFormElement) Submit()

type HTMLFrameElement Uses

type HTMLFrameElement struct{ *BasicHTMLElement }

type HTMLFrameSetElement Uses

type HTMLFrameSetElement struct{ *BasicHTMLElement }

type HTMLHRElement Uses

type HTMLHRElement struct{ *BasicHTMLElement }

type HTMLHeadElement Uses

type HTMLHeadElement struct{ *BasicHTMLElement }

type HTMLHeadingElement Uses

type HTMLHeadingElement struct{ *BasicHTMLElement }

type HTMLHtmlElement Uses

type HTMLHtmlElement struct{ *BasicHTMLElement }

type HTMLIFrameElement Uses

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 (*HTMLIFrameElement) ContentDocument Uses

func (e *HTMLIFrameElement) ContentDocument() Document

func (*HTMLIFrameElement) ContentWindow Uses

func (e *HTMLIFrameElement) ContentWindow() Window

type HTMLImageElement Uses

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 Uses

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 (*HTMLInputElement) CheckValidity Uses

func (e *HTMLInputElement) CheckValidity() bool

func (*HTMLInputElement) Files Uses

func (e *HTMLInputElement) Files() []*File

func (*HTMLInputElement) Form Uses

func (e *HTMLInputElement) Form() *HTMLFormElement

func (*HTMLInputElement) Labels Uses

func (e *HTMLInputElement) Labels() []*HTMLLabelElement

func (*HTMLInputElement) List Uses

func (e *HTMLInputElement) List() *HTMLDataListElement

func (*HTMLInputElement) Select Uses

func (e *HTMLInputElement) Select()

func (*HTMLInputElement) SetCustomValidity Uses

func (e *HTMLInputElement) SetCustomValidity(s string)

func (*HTMLInputElement) SetSelectionRange Uses

func (e *HTMLInputElement) SetSelectionRange(start, end int, direction string)

func (*HTMLInputElement) StepDown Uses

func (e *HTMLInputElement) StepDown(n int) error

func (*HTMLInputElement) StepUp Uses

func (e *HTMLInputElement) StepUp(n int) error

func (*HTMLInputElement) Validity Uses

func (e *HTMLInputElement) Validity() *ValidityState

type HTMLKeygenElement Uses

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 (*HTMLKeygenElement) CheckValidity Uses

func (e *HTMLKeygenElement) CheckValidity() bool

func (*HTMLKeygenElement) Form Uses

func (e *HTMLKeygenElement) Form() *HTMLFormElement

func (*HTMLKeygenElement) Labels Uses

func (e *HTMLKeygenElement) Labels() []*HTMLLabelElement

func (*HTMLKeygenElement) SetCustomValidity Uses

func (e *HTMLKeygenElement) SetCustomValidity(s string)

func (*HTMLKeygenElement) Validity Uses

func (e *HTMLKeygenElement) Validity() *ValidityState

type HTMLLIElement Uses

type HTMLLIElement struct {
    *BasicHTMLElement
    Value int `js:"value"`
}

type HTMLLabelElement Uses

type HTMLLabelElement struct {
    *BasicHTMLElement
    For string `js:"htmlFor"`
}

func (*HTMLLabelElement) Control Uses

func (e *HTMLLabelElement) Control() HTMLElement

func (*HTMLLabelElement) Form Uses

func (e *HTMLLabelElement) Form() *HTMLFormElement

type HTMLLegendElement Uses

type HTMLLegendElement struct{ *BasicHTMLElement }

func (*HTMLLegendElement) Form Uses

func (e *HTMLLegendElement) Form() *HTMLFormElement

type HTMLLinkElement Uses

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 (*HTMLLinkElement) Rel Uses

func (e *HTMLLinkElement) Rel() *TokenList

func (*HTMLLinkElement) Sheet Uses

func (e *HTMLLinkElement) Sheet() StyleSheet

func (*HTMLLinkElement) Sizes Uses

func (e *HTMLLinkElement) Sizes() *TokenList

type HTMLMapElement Uses

type HTMLMapElement struct {
    *BasicHTMLElement
    Name string `js:"name"`
}

func (*HTMLMapElement) Areas Uses

func (e *HTMLMapElement) Areas() []*HTMLAreaElement

func (*HTMLMapElement) Images Uses

func (e *HTMLMapElement) Images() []HTMLElement

type HTMLMediaElement Uses

type HTMLMediaElement struct {
    *BasicHTMLElement
    Paused bool `js:"paused"`
}

func (*HTMLMediaElement) Pause Uses

func (e *HTMLMediaElement) Pause()

func (*HTMLMediaElement) Play Uses

func (e *HTMLMediaElement) Play()

type HTMLMenuElement Uses

type HTMLMenuElement struct{ *BasicHTMLElement }

type HTMLMetaElement Uses

type HTMLMetaElement struct {
    *BasicHTMLElement
    Content   string `js:"content"`
    HTTPEquiv string `js:"httpEquiv"`
    Name      string `js:"name"`
}

type HTMLMeterElement Uses

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 (HTMLMeterElement) Labels Uses

func (e HTMLMeterElement) Labels() []*HTMLLabelElement

type HTMLModElement Uses

type HTMLModElement struct {
    *BasicHTMLElement
    Cite     string `js:"cite"`
    DateTime string `js:"dateTime"`
}

type HTMLOListElement Uses

type HTMLOListElement struct {
    *BasicHTMLElement
    Reversed bool   `js:"reversed"`
    Start    int    `js:"start"`
    Type     string `js:"type"`
}

type HTMLObjectElement Uses

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 (*HTMLObjectElement) CheckValidity Uses

func (e *HTMLObjectElement) CheckValidity() bool

func (*HTMLObjectElement) ContentDocument Uses

func (e *HTMLObjectElement) ContentDocument() Document

func (*HTMLObjectElement) ContentWindow Uses

func (e *HTMLObjectElement) ContentWindow() Window

func (*HTMLObjectElement) Form Uses

func (e *HTMLObjectElement) Form() *HTMLFormElement

func (*HTMLObjectElement) SetCustomValidity Uses

func (e *HTMLObjectElement) SetCustomValidity(s string)

func (*HTMLObjectElement) Validity Uses

func (e *HTMLObjectElement) Validity() *ValidityState

type HTMLOptGroupElement Uses

type HTMLOptGroupElement struct {
    *BasicHTMLElement
    Disabled bool   `js:"disabled"`
    Label    string `js:"label"`
}

type HTMLOptionElement Uses

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 (*HTMLOptionElement) Form Uses

func (e *HTMLOptionElement) Form() *HTMLFormElement

type HTMLOutputElement Uses

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 (*HTMLOutputElement) CheckValidity Uses

func (e *HTMLOutputElement) CheckValidity() bool

func (*HTMLOutputElement) For Uses

func (e *HTMLOutputElement) For() *TokenList

func (*HTMLOutputElement) Form Uses

func (e *HTMLOutputElement) Form() *HTMLFormElement

func (*HTMLOutputElement) Labels Uses

func (e *HTMLOutputElement) Labels() []*HTMLLabelElement

func (*HTMLOutputElement) SetCustomValidity Uses

func (e *HTMLOutputElement) SetCustomValidity(s string)

func (*HTMLOutputElement) Validity Uses

func (e *HTMLOutputElement) Validity() *ValidityState

type HTMLParagraphElement Uses

type HTMLParagraphElement struct{ *BasicHTMLElement }

type HTMLParamElement Uses

type HTMLParamElement struct {
    *BasicHTMLElement
    Name  string `js:"name"`
    Value string `js:"value"`
}

type HTMLPreElement Uses

type HTMLPreElement struct{ *BasicHTMLElement }

type HTMLProgressElement Uses

type HTMLProgressElement struct {
    *BasicHTMLElement
    Max      float64 `js:"max"`
    Position float64 `js:"position"`
    Value    float64 `js:"value"`
}

func (HTMLProgressElement) Labels Uses

func (e HTMLProgressElement) Labels() []*HTMLLabelElement

type HTMLQuoteElement Uses

type HTMLQuoteElement struct {
    *BasicHTMLElement
    Cite string `js:"cite"`
}

type HTMLScriptElement Uses

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 Uses

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 (*HTMLSelectElement) CheckValidity Uses

func (e *HTMLSelectElement) CheckValidity() bool

func (*HTMLSelectElement) Form Uses

func (e *HTMLSelectElement) Form() *HTMLFormElement

func (*HTMLSelectElement) Item Uses

func (e *HTMLSelectElement) Item(index int) *HTMLOptionElement

func (*HTMLSelectElement) Labels Uses

func (e *HTMLSelectElement) Labels() []*HTMLLabelElement

func (*HTMLSelectElement) NamedItem Uses

func (e *HTMLSelectElement) NamedItem(name string) *HTMLOptionElement

func (*HTMLSelectElement) Options Uses

func (e *HTMLSelectElement) Options() []*HTMLOptionElement

func (*HTMLSelectElement) SelectedOptions Uses

func (e *HTMLSelectElement) SelectedOptions() []*HTMLOptionElement

func (*HTMLSelectElement) SetCustomValidity Uses

func (e *HTMLSelectElement) SetCustomValidity(s string)

func (*HTMLSelectElement) Validity Uses

func (e *HTMLSelectElement) Validity() *ValidityState

type HTMLSourceElement Uses

type HTMLSourceElement struct {
    *BasicHTMLElement
    Media string `js:"media"`
    Src   string `js:"src"`
    Type  string `js:"type"`
}

type HTMLSpanElement Uses

type HTMLSpanElement struct{ *BasicHTMLElement }

type HTMLStyleElement Uses

type HTMLStyleElement struct{ *BasicHTMLElement }

type HTMLTableCaptionElement Uses

type HTMLTableCaptionElement struct{ *BasicHTMLElement }

type HTMLTableCellElement Uses

type HTMLTableCellElement struct {
    *BasicHTMLElement
    ColSpan   int `js:"colSpan"`
    RowSpan   int `js:"rowSpan"`
    CellIndex int `js:"cellIndex"`
}

type HTMLTableColElement Uses

type HTMLTableColElement struct {
    *BasicHTMLElement
    Span int `js:"span"`
}

type HTMLTableDataCellElement Uses

type HTMLTableDataCellElement struct{ *BasicHTMLElement }

type HTMLTableElement Uses

type HTMLTableElement struct{ *BasicHTMLElement }

type HTMLTableHeaderCellElement Uses

type HTMLTableHeaderCellElement struct {
    *BasicHTMLElement
    Abbr  string `js:"abbr"`
    Scope string `js:"scope"`
}

type HTMLTableRowElement Uses

type HTMLTableRowElement struct {
    *BasicHTMLElement
    RowIndex        int `js:"rowIndex"`
    SectionRowIndex int `js:"sectionRowIndex"`
}

func (*HTMLTableRowElement) Cells Uses

func (e *HTMLTableRowElement) Cells() []*HTMLTableCellElement

func (*HTMLTableRowElement) DeleteCell Uses

func (e *HTMLTableRowElement) DeleteCell(index int)

func (*HTMLTableRowElement) InsertCell Uses

func (e *HTMLTableRowElement) InsertCell(index int) *HTMLTableCellElement

type HTMLTableSectionElement Uses

type HTMLTableSectionElement struct{ *BasicHTMLElement }

func (*HTMLTableSectionElement) DeleteRow Uses

func (e *HTMLTableSectionElement) DeleteRow(index int)

func (*HTMLTableSectionElement) InsertRow Uses

func (e *HTMLTableSectionElement) InsertRow(index int) *HTMLTableRowElement

func (*HTMLTableSectionElement) Rows Uses

func (e *HTMLTableSectionElement) Rows() []*HTMLTableRowElement

type HTMLTemplateElement Uses

type HTMLTemplateElement struct{ *BasicHTMLElement }

func (*HTMLTemplateElement) Content Uses

func (e *HTMLTemplateElement) Content() DocumentFragment

type HTMLTextAreaElement Uses

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 (*HTMLTextAreaElement) CheckValidity Uses

func (e *HTMLTextAreaElement) CheckValidity() bool

func (*HTMLTextAreaElement) Form Uses

func (e *HTMLTextAreaElement) Form() *HTMLFormElement

func (*HTMLTextAreaElement) Labels Uses

func (e *HTMLTextAreaElement) Labels() []*HTMLLabelElement

func (*HTMLTextAreaElement) Select Uses

func (e *HTMLTextAreaElement) Select()

func (*HTMLTextAreaElement) SetCustomValidity Uses

func (e *HTMLTextAreaElement) SetCustomValidity(s string)

func (*HTMLTextAreaElement) SetSelectionRange Uses

func (e *HTMLTextAreaElement) SetSelectionRange(start, end int, direction string)

func (*HTMLTextAreaElement) Validity Uses

func (e *HTMLTextAreaElement) Validity() *ValidityState

type HTMLTimeElement Uses

type HTMLTimeElement struct {
    *BasicHTMLElement
    DateTime string `js:"dateTime"`
}

type HTMLTitleElement Uses

type HTMLTitleElement struct {
    *BasicHTMLElement
    Text string `js:"text"`
}

type HTMLTrackElement Uses

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 (*HTMLTrackElement) Track Uses

func (e *HTMLTrackElement) Track() *TextTrack

type HTMLUListElement Uses

type HTMLUListElement struct{ *BasicHTMLElement }

type HTMLUnknownElement Uses

type HTMLUnknownElement struct{ *BasicHTMLElement }

type HTMLVideoElement Uses

type HTMLVideoElement struct{ *HTMLMediaElement }

type HashChangeEvent Uses

type HashChangeEvent struct{ *BasicEvent }

type History Uses

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 Uses

type IDBVersionChangeEvent struct{ *BasicEvent }

type ImageData Uses

type ImageData struct {
    *js.Object

    Width  int        `js:"width"`
    Height int        `js:"height"`
    Data   *js.Object `js:"data"`
}

func (*ImageData) At Uses

func (m *ImageData) At(x, y int) color.Color

func (*ImageData) Bounds Uses

func (m *ImageData) Bounds() image.Rectangle

func (*ImageData) ColorModel Uses

func (m *ImageData) ColorModel() color.Model

func (*ImageData) NRGBAAt Uses

func (m *ImageData) NRGBAAt(x, y int) color.NRGBA

func (*ImageData) Set Uses

func (m *ImageData) Set(x, y int, c color.Color)

func (*ImageData) SetNRGBA Uses

func (m *ImageData) SetNRGBA(x, y int, c color.NRGBA)

type KeyboardEvent Uses

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 (*KeyboardEvent) ModifierState Uses

func (ev *KeyboardEvent) ModifierState(mod string) bool

type Location Uses

type Location struct {
    *js.Object
    *URLUtils
}

type MediaStreamEvent Uses

type MediaStreamEvent struct{ *BasicEvent }

type MessageEvent Uses

type MessageEvent struct {
    *BasicEvent
    Data *js.Object `js:"data"`
}

type MouseEvent Uses

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 (*MouseEvent) ModifierState Uses

func (ev *MouseEvent) ModifierState(mod string) bool

func (*MouseEvent) RelatedTarget Uses

func (ev *MouseEvent) RelatedTarget() Element

type MutationEvent Uses

type MutationEvent struct{ *BasicEvent }
type Navigator interface {
    NavigatorID
    NavigatorLanguage
    NavigatorOnLine
    NavigatorGeolocation
    // NavigatorPlugins
    // NetworkInformation
    CookieEnabled() bool
    DoNotTrack() string
    RegisterProtocolHandler(protocol, uri, title string)
}
type NavigatorGeolocation interface {
    Geolocation() Geolocation
}
type NavigatorID interface {
    AppName() string
    AppVersion() string
    Platform() string
    Product() string
    UserAgent() string
}
type NavigatorLanguage interface {
    Language() string
}
type NavigatorOnLine interface {
    Online() bool
}

type Node Uses

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)
}

func WrapNode Uses

func WrapNode(o *js.Object) Node

type OfflineAudioCompletionEvent Uses

type OfflineAudioCompletionEvent struct{ *BasicEvent }

type PageTransitionEvent Uses

type PageTransitionEvent struct{ *BasicEvent }

type ParentNode Uses

type ParentNode interface {
}

type PointerEvent Uses

type PointerEvent struct{ *BasicEvent }

type PopStateEvent Uses

type PopStateEvent struct{ *BasicEvent }

type Position Uses

type Position struct {
    Coords    *Coordinates
    Timestamp time.Time
}

type PositionError Uses

type PositionError struct {
    *js.Object
    Code int `js:"code"`
}

func (*PositionError) Error Uses

func (err *PositionError) Error() string

type PositionOptions Uses

type PositionOptions struct {
    EnableHighAccuracy bool
    Timeout            time.Duration
    MaximumAge         time.Duration
}

type ProgressEvent Uses

type ProgressEvent struct{ *BasicEvent }

type RTCPeerConnectionIceEvent Uses

type RTCPeerConnectionIceEvent struct{ *BasicEvent }

type RelatedEvent Uses

type RelatedEvent struct{ *BasicEvent }

type SVGDocument Uses

type SVGDocument interface{}

type SVGElement Uses

type SVGElement interface {
    Element
}

type SVGEvent Uses

type SVGEvent struct{ *BasicEvent }

type SVGZoomEvent Uses

type SVGZoomEvent struct{ *BasicEvent }

type Screen Uses

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 Uses

type Selection interface {
}

type SensorEvent Uses

type SensorEvent struct{ *BasicEvent }

type StorageEvent Uses

type StorageEvent struct{ *BasicEvent }

type StyleSheet Uses

type StyleSheet interface{}

type Text Uses

type Text struct {
    *BasicNode
}

type TextMetrics Uses

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"`
}

type TextTrack Uses

type TextTrack struct{ *js.Object }

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 Uses

type TimeEvent struct{ *BasicEvent }

type TokenList Uses

type TokenList struct {
    Length int `js:"length"`
    // contains filtered or unexported fields
}

func (*TokenList) Add Uses

func (tl *TokenList) Add(token string)

func (*TokenList) Contains Uses

func (tl *TokenList) Contains(token string) bool

func (*TokenList) Item Uses

func (tl *TokenList) Item(idx int) string

func (*TokenList) Remove Uses

func (tl *TokenList) Remove(token string)

func (*TokenList) Set Uses

func (tl *TokenList) Set(s []string)

Set sets the TokenList's value to the list of tokens in s.

Individual tokens in s shouldn't countain spaces.

func (*TokenList) SetString Uses

func (tl *TokenList) SetString(s string)

SetString sets the TokenList's value to the space-separated list of tokens in s.

func (*TokenList) Slice Uses

func (tl *TokenList) Slice() []string

func (*TokenList) String Uses

func (tl *TokenList) String() string

func (*TokenList) Toggle Uses

func (tl *TokenList) Toggle(token string)

type Touch Uses

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.

func (*Touch) Target Uses

func (t *Touch) Target() Element

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 Uses

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 (*TouchEvent) ChangedTouches Uses

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 (*TouchEvent) TargetTouches Uses

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 (*TouchEvent) Touches Uses

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 Uses

type TrackEvent struct{ *BasicEvent }

type TransitionEvent Uses

type TransitionEvent struct{ *BasicEvent }

type UIEvent Uses

type UIEvent struct{ *BasicEvent }

type URLUtils Uses

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 Uses

type UserProximityEvent struct{ *BasicEvent }

type ValidityState Uses

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 Uses

type WheelEvent struct {
    *BasicEvent
    DeltaX    float64 `js:"deltaX"`
    DeltaY    float64 `js:"deltaY"`
    DeltaZ    float64 `js:"deltaZ"`
    DeltaMode int     `js:"deltaMode"`
}

type Window Uses

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() 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()
}

func GetWindow Uses

func GetWindow() Window

Directories

PathSynopsis
v2Package dom provides Go bindings for the JavaScript DOM APIs.

Package dom imports 5 packages (graph) and is imported by 217 packages. Updated 2019-05-26. Refresh now. Tools for package owners.