Documentation ¶
Index ¶
- Constants
- type Attribute
- type Canvas
- type Class
- type Client
- type Console
- func (console Console) Clear()
- func (console Console) Count(label string)
- func (console Console) CountReset(label string)
- func (console Console) Debug(format string, args ...any)
- func (console Console) Error(format string, args ...any)
- func (console Console) Group(label string)
- func (console Console) GroupCollapsed(label string)
- func (console Console) GroupEnd()
- func (console Console) Info(format string, args ...any)
- func (console Console) Log(format string, args ...any)
- func (console Console) Profile(label string)
- func (console Console) ProfileEnd(label string)
- func (console Console) Time(label string)
- func (console Console) TimeEnd(label string)
- func (console Console) TimeLog(label string)
- func (console Console) Trace(args ...any)
- func (console Console) Warning(format string, args ...any)
- type Direction
- type Document
- func (doc Document) Body() HTMLElement
- func (doc *Document) CharacterSet() string
- func (doc *Document) ContentType() string
- func (doc *Document) Cookie() string
- func (doc Document) CreateCanvas() Canvas
- func (doc Document) CreateElement(name string) HTMLElement
- func (doc *Document) DesignMode() bool
- func (doc *Document) DocType() string
- func (doc *Document) Domain() string
- func (doc Document) Element(id string) HTMLElement
- func (doc *Document) Embeds() []Embed
- func (doc *Document) Fullscreen() Fullscreen
- func (doc Document) HTML() HTMLElement
- func (doc Document) Head() HTMLElement
- func (doc *Document) Hidden() bool
- func (doc *Document) LastModified() time.Time
- func (doc *Document) Node() Node
- func (doc *Document) ReadyState() string
- func (doc *Document) Referrer() string
- func (doc Document) SetTitle(title string)
- func (doc *Document) Title() string
- func (doc *Document) URL() string
- type Editable
- type Element
- func (el Element) AssignedSlot() Element
- func (el *Element) Attribute(name string) Attribute
- func (el *Element) Class() Class
- func (el *Element) Client() Client
- func (el *Element) ID() string
- func (el Element) InnerHTML() string
- func (el *Element) LocalName() string
- func (el *Element) Matches(selector string) bool
- func (el *Element) OuterHTML() string
- func (el *Element) ReleasePointerCapture(pointerID string)
- func (el *Element) RequestPointerLock()
- func (el *Element) Scroll() Scroll
- func (el *Element) ScrollBy(x, y int, smooth bool)
- func (el *Element) ScrollIntoView(smooth bool, block, inline string)
- func (el *Element) ScrollTo(x, y int, smooth bool)
- func (el Element) SetID(id string)
- func (el Element) SetInnerHTML(html string)
- func (el *Element) SetPointerCapture(pointerID string)
- func (el Element) SetSlot(name string)
- func (el Element) Shadow() ShadowDOM
- func (el Element) Slot() string
- func (el *Element) TagName() string
- type Embed
- type Event
- func (event *Event) Bubbles() bool
- func (event *Event) Cancelable() bool
- func (event *Event) Composed() bool
- func (event *Event) CurrentTarget() Value
- func (event *Event) EventType() EventType
- func (event *Event) PreventDefault()
- func (event *Event) StopImmediatePropagation()
- func (event *Event) StopPropagation()
- func (event *Event) Trusted() bool
- type EventTarget
- type EventType
- type Fullscreen
- type HTMLElement
- func (el *HTMLElement) Direction() Direction
- func (el *HTMLElement) Editable() bool
- func (el *HTMLElement) Hidden() bool
- func (el *HTMLElement) Lang() string
- func (el *HTMLElement) Nonce() string
- func (el *HTMLElement) Offset() Offset
- func (el HTMLElement) SetDirection(value Direction)
- func (el HTMLElement) SetEditable(value Editable)
- func (el HTMLElement) SetHidden(value bool)
- func (el HTMLElement) SetLang(value string)
- func (el HTMLElement) SetText(text string)
- func (el *HTMLElement) Style() css.CSSStyleDeclaration
- func (el *HTMLElement) TabIndex() int
- func (el *HTMLElement) Text() string
- func (el *HTMLElement) Title() string
- type HTTPRequest
- func (req HTTPRequest) Abort()
- func (req HTTPRequest) Send(body []byte) HTTPResponse
- func (req HTTPRequest) SetHeader(header, value string)
- func (req HTTPRequest) SetTimeout(timeout time.Duration)
- func (req HTTPRequest) SetWithCredentials(creds bool)
- func (req HTTPRequest) Timeout() time.Duration
- func (req HTTPRequest) WithCredentials() bool
- type HTTPResponse
- type Headers
- type MediaDevices
- type Navigator
- func (nav Navigator) CookieEnabled() bool
- func (nav Navigator) Language() string
- func (nav Navigator) Languages() []string
- func (nav Navigator) MaxTouchPoints() int
- func (nav Navigator) MediaDevices() MediaDevices
- func (nav Navigator) Online() bool
- func (nav Navigator) UserAgent() string
- func (nav Navigator) Vibrate(pattern []int)
- type Node
- func (node Node) AppendChild(child Node)
- func (node Node) BaseURI() string
- func (node Node) ChildNodes() []HTMLElement
- func (node Node) ChildrenCount() int
- func (node Node) Clone(deep bool) Node
- func (node Node) Connected() bool
- func (node Node) Content() string
- func (node Node) Document() Document
- func (node Node) FirstChild() HTMLElement
- func (node Node) HasChildNodes() bool
- func (node Node) Name() string
- func (node Node) Normalize()
- func (node Node) Parent() HTMLElement
- func (node Node) Remove() bool
- func (node Node) RemoveChild(child Node)
- func (node Node) RemoveChildren()
- func (node Node) Type() NodeType
- func (node Node) Value() string
- type NodeType
- type Offset
- type Promise
- type Screen
- type Scroll
- type ShadowDOM
- type Value
- func (v Value) Call(method string, args ...any) Value
- func (v Value) Canvas() Canvas
- func (v Value) Element() Element
- func (v Value) Embed() Embed
- func (v Value) Event() Event
- func (v Value) EventTarget() EventTarget
- func (v Value) Get(property string) Value
- func (v Value) HTMLElement() HTMLElement
- func (v Value) JSValue() js.Value
- func (v Value) MediaStream() audio.MediaStream
- func (v Value) New(args ...any) Value
- func (v Value) Node() Node
- func (v Value) OptionalString() string
- func (v Value) Promise() Promise
- func (v Value) Strings() (items []string)
- func (v *Value) Values() (items []Value)
- type Window
- func (window Window) AudioContext() audio.AudioContext
- func (window Window) Console() Console
- func (window Window) Document() Document
- func (window Window) Event() Event
- func (window Window) HTTPRequest(method, url string) HTTPRequest
- func (window Window) InnerHeight() int
- func (window Window) InnerWidth() int
- func (window Window) Navigator() Navigator
- func (window Window) OuterHeight() int
- func (window Window) OuterWidth() int
- func (window Window) RequestAnimationFrame(handler func(), recursive bool)
- func (window Window) Screen() Screen
- func (window Window) ScreenX() int
- func (window Window) ScreenY() int
- func (window Window) ScrollX() int
- func (window Window) ScrollY() int
- func (window Window) SetScrollX(pixels int)
- func (window Window) SetScrollY(pixels int)
Constants ¶
const ( // EventTypeError means that a resource failed to load. EventTypeError = EventType("error") // EventTypeAbort means that the loading of a resource has been aborted. EventTypeAbort = EventType("abort") // EventTypeLoad means that a resource and its dependent resources have finished loading. EventTypeLoad = EventType("load") // EventTypeBeforeUnload means that the window, the document and its resources are about to be unloaded. EventTypeBeforeUnload = EventType("beforeunload") // EventTypeUnload means that the document or a dependent resource is being unloaded. EventTypeUnload = EventType("unload") // EventTypeOnline means that the browser has gained access to the network. EventTypeOnline = EventType("online") // EventTypeOffline means that the browser has lost access to the network. EventTypeOffline = EventType("offline") // EventTypeFocus means that an element has received focus (does not bubble). EventTypeFocus = EventType("focus") // EventTypeBlur means that an element has lost focus (does not bubble). EventTypeBlur = EventType("blur") // EventTypeOpen means that a WebSocket connection has been established. EventTypeOpen = EventType("open") // EventTypeMessage means that a message is received through a WebSocket. EventTypeMessage = EventType("message") // EventTypeClose means that a WebSocket connection has been closed. EventTypeClose = EventType("close") // EventTypePageHide means that a session history entry is being traversed from. EventTypePageHide = EventType("pagehide") // EventTypePageShow means that a session history entry is being traversed to. EventTypePageShow = EventType("pageshow") // EventTypePopState means that a session history entry is being navigated to (in certain cases). EventTypePopState = EventType("popstate") // EventTypeAnimationStart means that a CSS animation has started. EventTypeAnimationStart = EventType("animationstart") // EventTypeAnimationCancel means that a CSS animation has aborted. EventTypeAnimationCancel = EventType("animationcancel") // EventTypeAnimationEnd means that a CSS animation has completed. EventTypeAnimationEnd = EventType("animationend") // EventTypeAnimationiteration means that a CSS animation is repeated. EventTypeAnimationIteration = EventType("animationiteration") // EventTypeTransitionStart means that a CSS transition has actually started (fired after any delay). EventTypeTransitionStart = EventType("transitionstart") // EventTypeTransitionCancel means that a CSS transition has been cancelled. EventTypeTransitionCancel = EventType("transitioncancel") // EventTypeTransitionEnd means that a CSS transition has completed. EventTypeTransitionEnd = EventType("transitionend") // EventTypeTransitionRun means that a CSS transition has begun running (fired before any delay starts). EventTypeTransitionRun = EventType("transitionrun") // EventTypeReset means that the reset button is pressed. // https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reset_event EventTypeReset = EventType("reset") // EventTypeSubmit means that the submit button is pressed. // https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit_event EventTypeSubmit = EventType("submit") // EventTypeBeforePrint means that the print dialog is opened. EventTypeBeforePrint = EventType("beforeprint") // EventTypeAfterPrint means that the print dialog is closed. EventTypeAfterPrint = EventType("afterprint") // EventTypeCompositionStart means that the composition of a passage of text is prepared (similar to keydown for a keyboard input, but works with other inputs such as speech recognition). EventTypeCompositionStart = EventType("compositionstart") // EventTypeCompositionUpdate means that a character is added to a passage of text being composed. EventTypeCompositionUpdate = EventType("compositionupdate") // EventTypeCompositionEnd means that the composition of a passage of text has been completed or canceled. EventTypeCompositionEnd = EventType("compositionend") // EventTypeFullscreenChange means that an element was turned to fullscreen mode or back to normal mode. EventTypeFullscreenChange = EventType("fullscreenchange") // EventTypeFullscreenError means that It was impossible to switch to fullscreen mode for technical reasons or because the permission was denied. EventTypeFullscreenError = EventType("fullscreenerror") // EventTypeResize means that the document view has been resized. EventTypeResize = EventType("resize") // EventTypeScroll means that the document view or an element has been scrolled. EventTypeScroll = EventType("scroll") // EventTypeCut means that the selection has been cut and copied to the clipboard EventTypeCut = EventType("cut") // EventTypeCopy means that the selection has been copied to the clipboard EventTypeCopy = EventType("copy") // EventTypePaste means that the item from the clipboard has been pasted EventTypePaste = EventType("paste") // EventTypeKeyDown means that aNY key is pressed EventTypeKeyDown = EventType("keydown") // EventTypeKeyPress means that aNY key except Shift, Fn, CapsLock is in pressed position. (Fired continously.) EventTypeKeyPress = EventType("keypress") // EventTypeKeyUp means that aNY key is released EventTypeKeyUp = EventType("keyup") // EventTypeAuxClick means that a pointing device button (ANY non-primary button) has been pressed and released on an element. EventTypeAuxClick = EventType("auxclick") // EventTypeClick means that a pointing device button (ANY button; soon to be primary button only) has been pressed and released on an element. EventTypeClick = EventType("click") // EventTypeContextMenu means that the right button of the mouse is clicked (before the context menu is displayed). EventTypeContextMenu = EventType("contextmenu") // EventTypeDoubleClick means that a pointing device button is clicked twice on an element. EventTypeDoubleClick = EventType("dblclick") // EventTypeMouseDown means that a pointing device button is pressed on an element. EventTypeMouseDown = EventType("mousedown") // EventTypeMouseEnter means that a pointing device is moved onto the element that has the listener attached. EventTypeMouseEnter = EventType("mouseenter") // EventTypeMouseLeave means that a pointing device is moved off the element that has the listener attached. EventTypeMouseLeave = EventType("mouseleave") // EventTypeMouseMove means that a pointing device is moved over an element. (Fired continously as the mouse moves.) EventTypeMouseMove = EventType("mousemove") // EventTypeMouseOver means that a pointing device is moved onto the element that has the listener attached or onto one of its children. EventTypeMouseOver = EventType("mouseover") // EventTypeMouseOut means that a pointing device is moved off the element that has the listener attached or off one of its children. EventTypeMouseOut = EventType("mouseout") // EventTypeMouseUp means that a pointing device button is released over an element. EventTypeMouseUp = EventType("mouseup") // EventTypePointerLockChange means that the pointer was locked or released. EventTypePointerLockChange = EventType("pointerlockchange") // EventTypePointerLockError means that It was impossible to lock the pointer for technical reasons or because the permission was denied. EventTypePointerLockError = EventType("pointerlockerror") // EventTypeSelect means that Some text is being selected. EventTypeSelect = EventType("select") // EventTypeWheel means that a wheel button of a pointing device is rotated in any direction. EventTypeWheel = EventType("wheel") // EventTypeDrag means that an element or text selection is being dragged (Fired continuously every 350ms). EventTypeDrag = EventType("drag") // EventTypeDragEnd means that a drag operation is being ended (by releasing a mouse button or hitting the escape key). EventTypeDragEnd = EventType("dragend") // EventTypeDragEnter means that a dragged element or text selection enters a valid drop target. EventTypeDragEnter = EventType("dragenter") // EventTypeDragStart means that the user starts dragging an element or text selection. EventTypeDragStart = EventType("dragstart") // EventTypeDragLeave means that a dragged element or text selection leaves a valid drop target. EventTypeDragLeave = EventType("dragleave") // EventTypeDragOver means that an element or text selection is being dragged over a valid drop target. (Fired continuously every 350ms.) EventTypeDragOver = EventType("dragover") // EventTypeDrop means that an element is dropped on a valid drop target. EventTypeDrop = EventType("drop") // EventTypeAudioProcess means that the input buffer of a ScriptProcessorNode is ready to be processed. EventTypeAudioProcess = EventType("audioprocess") // EventTypeCanPlay means that the browser can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content. EventTypeCanPlay = EventType("canplay") // EventTypeCanPlayThrough means that the browser estimates it can play the media up to its end without stopping for content buffering. EventTypeCanPlayThrough = EventType("canplaythrough") // EventTypeComplete means that the rendering of an OfflineAudioContext is terminated. EventTypeComplete = EventType("complete") // EventTypeDurationChange means that the duration attribute has been updated. EventTypeDurationChange = EventType("durationchange") // EventTypeEmptied means that the media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it. EventTypeEmptied = EventType("emptied") // EventTypeEnded means that Playback has stopped because the end of the media was reached. EventTypeEnded = EventType("ended") // EventTypeLoadedData means that the first frame of the media has finished loading. EventTypeLoadedData = EventType("loadeddata") // EventTypeLoadedMetadata means that the metadata has been loaded. EventTypeLoadedMetadata = EventType("loadedmetadata") // EventTypePause means that Playback has been paused. EventTypePause = EventType("pause") // EventTypePlay means that Playback has begun. EventTypePlay = EventType("play") // EventTypePlaying means that Playback is ready to start after having been paused or delayed due to lack of data. EventTypePlaying = EventType("playing") // EventTypeRateChange means that the playback rate has changed. EventTypeRateChange = EventType("ratechange") // EventTypeSeeked means that a seek operation completed. EventTypeSeeked = EventType("seeked") // EventTypeSeeking means that a seek operation began. EventTypeSeeking = EventType("seeking") // EventTypeStalled means that the user agent is trying to fetch media data, but data is unexpectedly not forthcoming. EventTypeStalled = EventType("stalled") // EventTypeSuspend means that Media data loading has been suspended. EventTypeSuspend = EventType("suspend") // EventTypeTimeUpdate means that the time indicated by the currentTime attribute has been updated. EventTypeTimeUpdate = EventType("timeupdate") // EventTypeVolumeChange means that the volume has changed. EventTypeVolumeChange = EventType("volumechange") // EventTypeWaiting means that Playback has stopped because of a temporary lack of data. EventTypeWaiting = EventType("waiting") // EventTypeLoadEnd means that Progress has stopped (after "error", "abort" or "load" have been dispatched). EventTypeLoadEnd = EventType("loadend") // EventTypeLoadStart means that Progress has begun. EventTypeLoadStart = EventType("loadstart") // EventTypeProgress means that In progress. EventTypeProgress = EventType("progress") // EventTypeTimeout means that Progression is terminated due to preset time expiring. EventTypeTimeout = EventType("timeout") )
const ( EditableTrue = Editable("true") EditableFalse = Editable("false") EditableInherit = Editable("inherit") )
const ( DirectionLTR = Direction("ltr") DirectionRTL = Direction("rtl") DirectionAuto = Direction("auto") )
const ( ELEMENT_NODE = NodeType(1) ATTRIBUTE_NODE = NodeType(2) // deprecated TEXT_NODE = NodeType(3) CDATA_SECTION_NODE = NodeType(4) ENTITY_REFERENCE_NODE = NodeType(5) // deprecated ENTITY_NODE = NodeType(6) // deprecated PROCESSING_INSTRUCTION_NODE = NodeType(7) COMMENT_NODE = NodeType(8) DOCUMENT_NODE = NodeType(9) DOCUMENT_TYPE_NODE = NodeType(10) DOCUMENT_FRAGMENT_NODE = NodeType(11) NOTATION_NODE = NodeType(12) // deprecated )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Canvas ¶
type Canvas struct {
HTMLElement
}
Canvas provides properties and methods for manipulating the layout and presentation of <canvas> elements. https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement
func (Canvas) Context ¶
Context returns a drawing context on the canvas, or null if the context ID is not supported. A drawing context lets you draw on the canvas. https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext
func (Canvas) Context2D ¶
Context2D returns 2D context to draw on canvas. https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext
func (Canvas) Height ¶
Height is the height of the <canvas> element interpreted in CSS pixels https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/height
func (Canvas) Width ¶
Width is the width of the <canvas> element interpreted in CSS pixels https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/width
type Class ¶
type Class struct {
// contains filtered or unexported fields
}
type Console ¶
type Console struct {
Value
}
https://developer.mozilla.org/en-US/docs/Web/API/Console
func (Console) Clear ¶
func (console Console) Clear()
https://developer.mozilla.org/en-US/docs/Web/API/Console/clear
func (Console) Count ¶
https://developer.mozilla.org/en-US/docs/Web/API/Console/count
func (Console) Debug ¶
https://developer.mozilla.org/en-US/docs/Web/API/Console/debug
func (Console) Error ¶
https://developer.mozilla.org/en-US/docs/Web/API/Console/error
func (Console) Group ¶
https://developer.mozilla.org/en-US/docs/Web/API/Console/group
func (Console) GroupCollapsed ¶
https://developer.mozilla.org/en-US/docs/Web/API/Console/groupCollapsed
func (Console) GroupEnd ¶
func (console Console) GroupEnd()
https://developer.mozilla.org/en-US/docs/Web/API/Console/groupEnd
func (Console) Info ¶
https://developer.mozilla.org/en-US/docs/Web/API/Console/info
func (Console) Log ¶
https://developer.mozilla.org/en-US/docs/Web/API/Console/log
func (Console) Time ¶
https://developer.mozilla.org/en-US/docs/Web/API/Console/time
func (Console) Trace ¶
https://developer.mozilla.org/en-US/docs/Web/API/Console/trace
type Document ¶
type Document struct {
Value
}
func (Document) Body ¶
func (doc Document) Body() HTMLElement
Body returns the <body> or <frameset> node of the current document. https://developer.mozilla.org/en-US/docs/Web/API/Document/body
func (*Document) CharacterSet ¶
CharacterSet returns document's encoding. https://developer.mozilla.org/en-US/docs/Web/API/Document/characterSet
func (*Document) ContentType ¶
ContentType returns document's content type. https://developer.mozilla.org/en-US/docs/Web/API/Document/contentType
func (*Document) Cookie ¶
Cookie returns the HTTP cookies that apply to the Document. If there are no cookies or cookies can't be applied to this resource, the empty string will be returned.
func (Document) CreateCanvas ¶
func (Document) CreateElement ¶
func (doc Document) CreateElement(name string) HTMLElement
https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement
func (*Document) DesignMode ¶
DesignMode indicates whether the document can be edited. https://developer.mozilla.org/en-US/docs/Web/API/Document/designMode
func (*Document) DocType ¶
https://developer.mozilla.org/en-US/docs/Web/API/Document/doctype
func (*Document) Domain ¶
https://developer.mozilla.org/en-US/docs/Web/API/Document/domain
func (Document) Element ¶
func (doc Document) Element(id string) HTMLElement
https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById
func (*Document) Embeds ¶
Embeds returns <object> and <embed> elements in the document. https://developer.mozilla.org/en-US/docs/Web/API/Document/embeds https://developer.mozilla.org/en-US/docs/Web/API/Document/plugins
func (*Document) Fullscreen ¶
func (doc *Document) Fullscreen() Fullscreen
func (Document) HTML ¶
func (doc Document) HTML() HTMLElement
HTML returns the Element that is a direct child of the document. For HTML documents, this is normally the <html> element. https://developer.mozilla.org/en-US/docs/Web/API/Document/head
func (Document) Head ¶
func (doc Document) Head() HTMLElement
Head returns the <head> element of the current document.
func (*Document) Hidden ¶
Hidden is true when the webpage is in the background and not visible to the user https://developer.mozilla.org/en-US/docs/Web/API/Document/hidden
func (*Document) LastModified ¶
https://developer.mozilla.org/en-US/docs/Web/API/Document/lastModified
func (*Document) Referrer ¶
https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer
func (Document) SetTitle ¶
https://developer.mozilla.org/en-US/docs/Web/API/Document/title
func (*Document) Title ¶
https://developer.mozilla.org/en-US/docs/Web/API/Document/title
func (*Document) URL ¶
URL returns the URL for the current document. https://developer.mozilla.org/en-US/docs/Web/API/Document/URL
type Element ¶
type Element struct {
Value
}
func (Element) AssignedSlot ¶
func (*Element) ReleasePointerCapture ¶
func (*Element) RequestPointerLock ¶
func (el *Element) RequestPointerLock()
func (*Element) ScrollIntoView ¶
func (Element) SetInnerHTML ¶
func (*Element) SetPointerCapture ¶
type Embed ¶
type Embed struct {
HTMLElement
}
Embed represents HTMLEmbedElement and HTMLObjectElement. https://developer.mozilla.org/en-US/docs/Web/API/HTMLEmbedElement https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement
func (*Embed) Height ¶
https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/height https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object#attr-height https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed#attr-height
func (*Embed) MIMEType ¶
https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/type https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object#attr-type https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed#attr-type
type Event ¶
type Event struct {
Value
}
https://developer.mozilla.org/en-US/docs/Web/API/Event
func (*Event) CurrentTarget ¶
func (*Event) PreventDefault ¶
func (event *Event) PreventDefault()
https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault
func (*Event) StopImmediatePropagation ¶
func (event *Event) StopImmediatePropagation()
https://developer.mozilla.org/en-US/docs/Web/API/Event/stopImmediatePropagation
func (*Event) StopPropagation ¶
func (event *Event) StopPropagation()
https://developer.mozilla.org/en-US/docs/Web/API/Event/stopPropagation
type EventTarget ¶
type EventTarget struct {
Value
}
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget
func (EventTarget) Listen ¶
func (target EventTarget) Listen(event EventType, handler func(event Event))
Listen registers callback for the given event. https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
type EventType ¶
type EventType string
EVENT TYPES https://developer.mozilla.org/en-US/docs/Web/Events
type Fullscreen ¶
type Fullscreen struct {
// contains filtered or unexported fields
}
type HTMLElement ¶
type HTMLElement struct {
Element
}
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
func (*HTMLElement) Direction ¶
func (el *HTMLElement) Direction() Direction
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dir
func (*HTMLElement) Editable ¶
func (el *HTMLElement) Editable() bool
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/isContentEditable
func (*HTMLElement) Hidden ¶
func (el *HTMLElement) Hidden() bool
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/hidden
func (*HTMLElement) Lang ¶
func (el *HTMLElement) Lang() string
func (*HTMLElement) Nonce ¶
func (el *HTMLElement) Nonce() string
https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/nonce
func (*HTMLElement) Offset ¶
func (el *HTMLElement) Offset() Offset
Incapsulates a set of offset-related properties. https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetLeft https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetWidth
func (HTMLElement) SetDirection ¶
func (el HTMLElement) SetDirection(value Direction)
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dir
func (HTMLElement) SetEditable ¶
func (el HTMLElement) SetEditable(value Editable)
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/contentEditable
func (HTMLElement) SetHidden ¶
func (el HTMLElement) SetHidden(value bool)
func (HTMLElement) SetLang ¶
func (el HTMLElement) SetLang(value string)
func (HTMLElement) SetText ¶
func (el HTMLElement) SetText(text string)
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText
func (*HTMLElement) Style ¶
func (el *HTMLElement) Style() css.CSSStyleDeclaration
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style
func (*HTMLElement) TabIndex ¶
func (el *HTMLElement) TabIndex() int
https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/tabIndex
func (*HTMLElement) Text ¶
func (el *HTMLElement) Text() string
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText
func (*HTMLElement) Title ¶
func (el *HTMLElement) Title() string
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/title
type HTTPRequest ¶ added in v0.2.0
type HTTPRequest struct { Value // contains filtered or unexported fields }
Object used to send HTTP requests. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest
func (HTTPRequest) Abort ¶ added in v0.2.0
func (req HTTPRequest) Abort()
Abort aborts the request if it has already been sent. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/abort
func (HTTPRequest) Send ¶ added in v0.2.0
func (req HTTPRequest) Send(body []byte) HTTPResponse
Send the HTTP request. This operation is blocking on the Go side but doesn't block JS-side main thread. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/send
func (HTTPRequest) SetHeader ¶ added in v0.2.0
func (req HTTPRequest) SetHeader(header, value string)
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader
func (HTTPRequest) SetTimeout ¶ added in v0.2.0
func (req HTTPRequest) SetTimeout(timeout time.Duration)
SetTimeout sets the time after which the request will be terminated. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout
func (HTTPRequest) SetWithCredentials ¶ added in v0.2.0
func (req HTTPRequest) SetWithCredentials(creds bool)
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials
func (HTTPRequest) Timeout ¶ added in v0.2.0
func (req HTTPRequest) Timeout() time.Duration
Timeout represents how long a request can take before automatically being terminated. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout
func (HTTPRequest) WithCredentials ¶ added in v0.2.0
func (req HTTPRequest) WithCredentials() bool
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials
type HTTPResponse ¶ added in v0.2.0
type HTTPResponse struct {
// contains filtered or unexported fields
}
func (HTTPResponse) Body ¶ added in v0.2.0
func (resp HTTPResponse) Body() []byte
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/response
func (HTTPResponse) Finished ¶ added in v0.2.0
func (resp HTTPResponse) Finished() bool
Finished indicates is the request is succesfully completed. It can be false if the request was aborted. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState
func (HTTPResponse) Headers ¶ added in v0.2.0
func (resp HTTPResponse) Headers() Headers
func (HTTPResponse) Status ¶ added in v0.2.0
func (resp HTTPResponse) Status() string
Always an empty string for HTTP/2 responses. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/statusText
func (HTTPResponse) StatusCode ¶ added in v0.2.0
func (resp HTTPResponse) StatusCode() int
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/status
func (HTTPResponse) Text ¶ added in v0.2.0
func (resp HTTPResponse) Text() string
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseText
func (HTTPResponse) URL ¶ added in v0.2.0
func (resp HTTPResponse) URL() string
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseURL
type Headers ¶ added in v0.2.0
type Headers struct {
// contains filtered or unexported fields
}
Headers encapsulates methods to work with HTTP response headers. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getAllResponseHeaders https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getResponseHeader
func (Headers) Get ¶ added in v0.2.0
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getResponseHeader
func (Headers) Has ¶ added in v0.2.0
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getResponseHeader
func (Headers) Values ¶ added in v0.2.0
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getAllResponseHeaders
type MediaDevices ¶
type MediaDevices struct {
Value
}
func (MediaDevices) Audio ¶
func (devices MediaDevices) Audio() Promise
https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia
func (MediaDevices) Video ¶
func (devices MediaDevices) Video() Promise
https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia
type Navigator ¶
type Navigator struct {
}func (Navigator) CookieEnabled ¶
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/cookieEnabled
func (Navigator) Language ¶
https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/language
func (Navigator) Languages ¶
https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/languages
func (Navigator) MaxTouchPoints ¶
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/maxTouchPoints
func (Navigator) MediaDevices ¶
func (nav Navigator) MediaDevices() MediaDevices
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/mediaDevices
func (Navigator) Online ¶
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/onLine
func (Navigator) Vibrate ¶
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
https://developer.mozilla.org/en-US/docs/Web/API/Node https://developer.mozilla.org/en-US/docs/Web/API/ParentNode
func (Node) BaseURI ¶
Returns the base URL of the document containing the Node. https://developer.mozilla.org/en-US/docs/Web/API/Node/baseURI
func (Node) ChildNodes ¶
func (node Node) ChildNodes() []HTMLElement
https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes
func (Node) ChildrenCount ¶
Returns the number of children of this Node which are elements. https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/childElementCount
func (Node) Clone ¶
Clone a Node, and optionally, all of its contents. https://developer.mozilla.org/en-US/docs/Web/API/Node/cloneNode
func (Node) Connected ¶
A boolean indicating whether or not the Node is connected (directly or indirectly) to the context object, e.g. the Document object in the case of the normal DOM, or the ShadowRoot in the case of a shadow DOM. https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected
func (Node) FirstChild ¶
func (node Node) FirstChild() HTMLElement
https://developer.mozilla.org/en-US/docs/Web/API/Node/firstChild
func (Node) Normalize ¶
func (node Node) Normalize()
Clean up all the text nodes under this element (merge adjacent, remove empty). https://developer.mozilla.org/en-US/docs/Web/API/Node/normalize
func (Node) Parent ¶
func (node Node) Parent() HTMLElement
https://developer.mozilla.org/en-US/docs/Web/API/Node/parentElement
func (Node) RemoveChildren ¶
func (node Node) RemoveChildren()
Remove all children. https://developer.mozilla.org/en-US/docs/Web/API/Node/removeChild
func (Node) Type ¶
Returns the type of the node. https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
type Offset ¶
type Offset struct {
// contains filtered or unexported fields
}
Incapsulates a set of offset-related properties. https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetLeft https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetWidth
func (*Offset) Height ¶
Returns the height of an element, relative to the layout. https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight
func (*Offset) Left ¶
Returns the distance from this element's left border to its Offset.Parent's left border. https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetLeft
func (*Offset) Parent ¶
Returns an Element that is the element from which all offset calculations are currently computed. https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent
func (*Offset) Top ¶
Returns the distance from this element's top border to its Offset.Parent's top border. https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop
func (*Offset) Width ¶
Returns the width of an element, relative to the layout. https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetWidth
type Promise ¶
type Promise struct {
Value
}
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
type Screen ¶
type Screen struct {
Value
}
https://developer.mozilla.org/en-US/docs/Web/API/Screen
func (Screen) AvailableHeight ¶
Returns the height of the screen, in pixels, minus permanent or semipermanent user interface features displayed by the operating system, such as the Taskbar on Windows. https://developer.mozilla.org/en-US/docs/Web/API/Screen/availHeight
func (Screen) AvailableWidth ¶
Returns the amount of horizontal space in pixels available to the window. https://developer.mozilla.org/en-US/docs/Web/API/Screen/availWidth
func (Screen) Height ¶
Returns the height of the screen in pixels. https://developer.mozilla.org/en-US/docs/Web/API/Screen/height
func (Screen) Width ¶
Returns the width of the screen. https://developer.mozilla.org/en-US/docs/Web/API/Screen/width
type Scroll ¶
type Scroll struct {
// contains filtered or unexported fields
}
type ShadowDOM ¶
type ShadowDOM struct {
// contains filtered or unexported fields
}
func (ShadowDOM) Attach ¶
Attach attaches a shadow DOM tree to the specified element and returns ShadowRoot. We always create "open" shadow DOM because "closed" can't totally forbid access to the DOM and give falls feeling of protection. Read more: https://blog.revillweb.com/open-vs-closed-shadow-dom-9f3d7427d1af
type Value ¶
Value is an extended js.Value with more types support
func (Value) EventTarget ¶
func (v Value) EventTarget() EventTarget
Represents the current value into EventTarget
func (Value) HTMLElement ¶
func (v Value) HTMLElement() HTMLElement
Represents the current value into HTMLElement
func (Value) MediaStream ¶
func (v Value) MediaStream() audio.MediaStream
Represents the current value into audio.MediaStream
func (Value) OptionalString ¶
OptionalString returns empty string if Value is null
type Window ¶
type Window struct {
Value
}
https://developer.mozilla.org/en-US/docs/Web/API/Window
func GetWindow ¶
func GetWindow() Window
Returns JS global https://developer.mozilla.org/en-US/docs/Web/API/Window
func (Window) AudioContext ¶
func (window Window) AudioContext() audio.AudioContext
https://developer.mozilla.org/en-US/docs/Web/API/AudioContext
func (Window) Console ¶
https://developer.mozilla.org/en-US/docs/Web/API/Window/console https://developer.mozilla.org/en-US/docs/Web/API/Console
func (Window) Document ¶
https://developer.mozilla.org/en-US/docs/Web/API/Window/document https://developer.mozilla.org/en-US/docs/Web/API/Document
func (Window) Event ¶
Event returns the current event. The Event object passed directly to event handlers should be used instead whenever possible. https://developer.mozilla.org/en-US/docs/Web/API/Window/event
func (Window) HTTPRequest ¶ added in v0.2.0
func (window Window) HTTPRequest(method, url string) HTTPRequest
Create an object used to send HTTP requests (XMLHttpRequest), open it (initialize) and set the response type (responseType) to binary. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/open https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType
func (Window) InnerHeight ¶
Returns the height of the content area of the browser window including, if rendered, the horizontal scrollbar. https://developer.mozilla.org/en-US/docs/Web/API/Window/innerHeight
func (Window) InnerWidth ¶
Returns the width of the content area of the browser window including, if rendered, the vertical scrollbar. https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth
func (Window) Navigator ¶
Navigator returns a reference to the Navigator object, which has methods and properties about the application running the script. https://developer.mozilla.org/en-US/docs/Web/API/Window/navigator https://developer.mozilla.org/en-US/docs/Web/API/Navigator
func (Window) OuterHeight ¶
Returns the height of the outside of the browser window. https://developer.mozilla.org/en-US/docs/Web/API/Window/outerHeight
func (Window) OuterWidth ¶
Returns the width of the outside of the browser window. https://developer.mozilla.org/en-US/docs/Web/API/Window/outerWidth
func (Window) RequestAnimationFrame ¶
https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY
func (Window) Screen ¶
https://developer.mozilla.org/en-US/docs/Web/API/Window/screen https://developer.mozilla.org/en-US/docs/Web/API/Screen
func (Window) ScreenX ¶
Returns the horizontal distance from the left border of the user's browser viewport to the left side of the screen. https://developer.mozilla.org/en-US/docs/Web/API/Window/screenX
func (Window) ScreenY ¶
Returns the vertical distance from the top border of the user's browser viewport to the top side of the screen. https://developer.mozilla.org/en-US/docs/Web/API/Window/screenY
func (Window) ScrollX ¶
Returns the number of pixels that the document has already been scrolled horizontally. https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollX
func (Window) ScrollY ¶
Returns the number of pixels that the document has already been scrolled vertically. https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY