Documentation ¶
Index ¶
- type BeforeUnloadEvent
- type Event
- type FOCUS_EVENT
- type FULLSCREEN_EVENT
- type FocusEvent
- type GENERIC_EVENT
- type Handler
- type HashChangeEvent
- type INPUT_EVENT
- type InputEvent
- type KEYBOARD_EVENT
- type KEYBOARD_LOCATION
- type KeyboardEvent
- func (_this *KeyboardEvent) AltKey() bool
- func (_this *KeyboardEvent) CharCode() uint
- func (_this *KeyboardEvent) Code() string
- func (_this *KeyboardEvent) CtrlKey() bool
- func (_this *KeyboardEvent) GetModifierState(keyArg string) bool
- func (_this *KeyboardEvent) IsComposing() bool
- func (_this *KeyboardEvent) Key() string
- func (_this *KeyboardEvent) KeyCode() uint
- func (_this *KeyboardEvent) Location() KEYBOARD_LOCATION
- func (_this *KeyboardEvent) MetaKey() bool
- func (_this *KeyboardEvent) Repeat() bool
- func (_this *KeyboardEvent) ShiftKey() bool
- type MOUSE_EVENT
- type MouseEvent
- func (_this *MouseEvent) AltKey() bool
- func (_this *MouseEvent) Button() int
- func (_this *MouseEvent) Buttons() int
- func (_this *MouseEvent) ClientX() float64
- func (_this *MouseEvent) ClientY() float64
- func (_this *MouseEvent) CtrlKey() bool
- func (_this *MouseEvent) GetModifierState(keyArg string) bool
- func (_this *MouseEvent) MetaKey() bool
- func (_this *MouseEvent) MovementX() int
- func (_this *MouseEvent) MovementY() int
- func (_this *MouseEvent) OffsetX() float64
- func (_this *MouseEvent) OffsetY() float64
- func (_this *MouseEvent) PageX() float64
- func (_this *MouseEvent) PageY() float64
- func (_this *MouseEvent) RelatedTarget() js.JSValue
- func (_this *MouseEvent) ScreenX() float64
- func (_this *MouseEvent) ScreenY() float64
- func (_this *MouseEvent) ShiftKey() bool
- func (_this *MouseEvent) X() float64
- func (_this *MouseEvent) Y() float64
- type PAGETRANSITION_EVENT
- type POINTER_EVENT
- type PageTransitionEvent
- type PointerEvent
- func (_this *PointerEvent) Height() float64
- func (_this *PointerEvent) IsPrimary() bool
- func (_this *PointerEvent) PointerId() int
- func (_this *PointerEvent) PointerType() string
- func (_this *PointerEvent) Pressure() float64
- func (_this *PointerEvent) TangentialPressure() float64
- func (_this *PointerEvent) TiltX() int
- func (_this *PointerEvent) TiltY() int
- func (_this *PointerEvent) Twist() int
- func (_this *PointerEvent) Width() float64
- type UIEvent
- type WHEEL_DELTA_MODE
- type WheelEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeforeUnloadEvent ¶
type BeforeUnloadEvent struct {
Event
}
fired when the window, the document and its resources are about to be unloaded.
https://developer.mozilla.org/en-US/docs/Web/API/BeforeUnloadEvent
func CastBeforeUnloadEvent ¶
func CastBeforeUnloadEvent(_jsv js.JSValueProvider) *BeforeUnloadEvent
CastBeforeUnloadEvent is casting a js.Value into BeforeUnloadEvent.
func (*BeforeUnloadEvent) ReturnValue ¶
func (_evt *BeforeUnloadEvent) ReturnValue() string
ReturnValue returning attribute 'returnValue' with
func (*BeforeUnloadEvent) SetReturnValue ¶
func (_evt *BeforeUnloadEvent) SetReturnValue(value string)
SetReturnValue setting attribute 'returnValue' with
type Event ¶
Event represents an event which takes place in the DOM.
https://developer.mozilla.org/en-US/docs/Web/API/Event
func CastEvent ¶
func CastEvent(_jsv js.JSValueProvider) *Event
CastEvent is casting a js.Value into Event.
func (*Event) CurrentTarget ¶
CurrentTarget always refers to the element to which the event handler has been attached, as opposed to Event.target, which identifies the element on which the event occurred and which may be its descendant.
https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget
func (*Event) Target ¶
Target: a reference to the object onto which the event was dispatched.
https://developer.mozilla.org/en-US/docs/Web/API/Event/target
func (*Event) Type ¶
Type: there are many types of events, some of which use other interfaces based on the main Event interface. Event itself contains the properties and methods which are common to all events.
It is set when the event is constructed. Commonly used to refer to the specific event, such as click, load, or error
type FOCUS_EVENT ¶
type FOCUS_EVENT string
const ( FOCUS_ONBLUR FOCUS_EVENT = "blur" FOCUS_ONFOCUS FOCUS_EVENT = "focus" )
type FULLSCREEN_EVENT ¶
type FULLSCREEN_EVENT string
const ( FULLSCREEN_ONCHANGE FULLSCREEN_EVENT = "fullscreenchange" FULLSCREEN_ONERROR FULLSCREEN_EVENT = "fullscreenerror" )
type FocusEvent ¶
type FocusEvent struct {
UIEvent
}
func CastFocusEvent ¶
func CastFocusEvent(_jsv js.JSValueProvider) *FocusEvent
NewFocusEventFromJS is casting a js.Value into FocusEvent.
func (*FocusEvent) RelatedTarget ¶
func (_evt *FocusEvent) RelatedTarget() js.JSValue
RelatedTarget returning attribute 'relatedTarget'
type GENERIC_EVENT ¶
type GENERIC_EVENT string
const ( GENERIC_ONCANCEL GENERIC_EVENT = "cancel" GENERIC_ONCHANGE GENERIC_EVENT = "change" GENERIC_ONCLOSE GENERIC_EVENT = "close" GENERIC_ONCUECHANGE GENERIC_EVENT = "cuechange" GENERIC_ONINVALID GENERIC_EVENT = "invalid" GENERIC_ONLOAD GENERIC_EVENT = "load" GENERIC_ONRESET GENERIC_EVENT = "reset" GENERIC_ONSCROLL GENERIC_EVENT = "scroll" GENERIC_ONSELECT GENERIC_EVENT = "select" GENERIC_ONSELECTIONCHANGE GENERIC_EVENT = "selectionchange" GENERIC_ONSELECTSTART GENERIC_EVENT = "selectstart" GENERIC_ONSUBMIT GENERIC_EVENT = "submit" GENERIC_ONTOGGLE GENERIC_EVENT = "toggle" GENERIC_ONPOINTERLOCKCHANGE GENERIC_EVENT = "pointerlockchange" GENERIC_ONPOINTERLOCKERROR GENERIC_EVENT = "pointerlockerror" )
const ( GENERIC_WIN_ONAFTERPRINT GENERIC_EVENT = "afterprint" GENERIC_WIN_ONAPPINSTALLED GENERIC_EVENT = "appinstalled" GENERIC_WIN_BEFOREPRINT GENERIC_EVENT = "beforeprint" GENERIC_WIN_LANGUAGECHANGE GENERIC_EVENT = "languagechange" GENERIC_WIN_OFFLINE GENERIC_EVENT = "offline" GENERIC_WIN_ONLINE GENERIC_EVENT = "online" GENERIC_WIN_ORIENTATIONCHANGE GENERIC_EVENT = "orientationchange" )
const ( GENERIC_MEDIA_ONABORT GENERIC_EVENT = "abort" // Fired when the resource was not fully loaded, but not as the result of an error. GENERIC_MEDIA_ONCANPLAY GENERIC_EVENT = "canplay" // Fired when the user agent 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. GENERIC_MEDIA_ONCANPLAYTHROUGH GENERIC_EVENT = "canplaythrough" // Fired when the user agent can play the media, and estimates that enough data has been loaded to play the media up to its end without having to stop for further buffering of content. GENERIC_MEDIA_ONDURATIONCHANGE GENERIC_EVENT = "durationchange" // Fired when the duration property has been updated. GENERIC_MEDIA_ONEMPTIED GENERIC_EVENT = "emptied" // Fired when the media has become empty; for example, when the media has already been loaded (or partially loaded), and the HTMLMediaElement.load() method is called to reload it. GENERIC_MEDIA_ONENDED GENERIC_EVENT = "ended" // Fired when playback stops when end of the media (<audio> or <video>) is reached or because no further data is available. GENERIC_MEDIA_ONERROR GENERIC_EVENT = "error" // Fired when the resource could not be loaded due to an error. GENERIC_MEDIA_ONLOADEDDATA GENERIC_EVENT = "loadeddata" // Fired when the first frame of the media has finished loading. GENERIC_MEDIA_ONLOADEDMETADATA GENERIC_EVENT = "loadedmetadata" // Fired when the metadata has been loaded. GENERIC_MEDIA_ONLOADSTART GENERIC_EVENT = "loadstart" // Fired when the browser has started to load a resource. GENERIC_MEDIA_ONPAUSE GENERIC_EVENT = "pause" // Fired when a request to pause play is handled and the activity has entered its paused state, most commonly occurring when the media's HTMLMediaElement.pause() method is called. GENERIC_MEDIA_ONPLAY GENERIC_EVENT = "play" // Fired when the paused property is changed from true to false, as a result of the HTMLMediaElement.play() method, or the autoplay attribute. GENERIC_MEDIA_ONPLAYING GENERIC_EVENT = "playing" // Fired when playback is ready to start after having been paused or delayed due to lack of data. GENERIC_MEDIA_ONRATECHANGE GENERIC_EVENT = "ratechange" // Fired when the playback rate has changed. GENERIC_MEDIA_ONSEEKED GENERIC_EVENT = "seeked" // Fired when a seek operation completes. GENERIC_MEDIA_ONSEEKING GENERIC_EVENT = "seeking" // Fired when a seek operation begins. GENERIC_MEDIA_ONSTALLED GENERIC_EVENT = "stalled" // Fired when the user agent is trying to fetch media data, but data is unexpectedly not forthcoming. GENERIC_MEDIA_ONSUSPEND GENERIC_EVENT = "suspend" // Fired when the media data loading has been suspended. GENERIC_MEDIA_ONTIMEUPDATE GENERIC_EVENT = "timeupdate" // Fired when the time indicated by the currentTime property has been updated. GENERIC_MEDIA_ONVOLUMECHANGE GENERIC_EVENT = "volumechange" // Fired when the volume has changed. GENERIC_MEDIA_ONWAITING GENERIC_EVENT = "waiting" // Fired when playback has stopped because of a temporary lack of data. )
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewEventHandler ¶
type HashChangeEvent ¶
type HashChangeEvent struct {
Event
}
fire when the fragment identifier of the URL has changed.
https://developer.mozilla.org/en-US/docs/Web/API/HashChangeEvent
func CastHashChangeEvent ¶
func CastHashChangeEvent(_jsv js.JSValueProvider) *HashChangeEvent
CastHashChangeEvent is casting a js.Value into HashChangeEvent.
func (*HashChangeEvent) NewURL ¶
func (_evt *HashChangeEvent) NewURL() *url.URL
NewURL returning attribute 'newURL' with type string (idl: USVString).
func (*HashChangeEvent) OldURL ¶
func (_evt *HashChangeEvent) OldURL() *url.URL
OldURL returning attribute 'oldURL' with type string (idl: USVString).
type INPUT_EVENT ¶
type INPUT_EVENT string
represents an event notifying the user of editable content changes.
const ( INPUT_ONBEFOREINPUT INPUT_EVENT = "beforeinput" // Fired when the value of an <input>, <select>, or <textarea> element is about to be modified. INPUT_ONINPUT INPUT_EVENT = "input" // Fired when the value of an <input>, <select>, or <textarea> element has been changed. INPUT_ONCHANGE INPUT_EVENT = "change" // Fired when the value of an <input>, <select>, or <textarea> element has been changed and committed by the user. )
type InputEvent ¶
type InputEvent struct {
UIEvent
}
func CastInputEvent ¶
func CastInputEvent(_jsv js.JSValueProvider) *InputEvent
CastInputEvent is casting a js.Value into InputEvent.
func (*InputEvent) Data ¶
func (_this *InputEvent) Data() string
Data returning attribute 'data' with
func (*InputEvent) InputType ¶
func (_this *InputEvent) InputType() string
InputType returning attribute 'inputType' with
func (*InputEvent) IsComposing ¶
func (_this *InputEvent) IsComposing() bool
IsComposing returning attribute 'isComposing' with
type KEYBOARD_EVENT ¶
type KEYBOARD_EVENT string
const ( KEYBOARD_ONKEYDOWN KEYBOARD_EVENT = "keydown" KEYBOARD_ONKEYPRESS KEYBOARD_EVENT = "keypress" KEYBOARD_ONKEYUP KEYBOARD_EVENT = "keyup" )
type KEYBOARD_LOCATION ¶
type KEYBOARD_LOCATION uint
const ( KEYBOARD_LOC_STANDARD KEYBOARD_LOCATION = 0x00 KEYBOARD_LOC_LEFT KEYBOARD_LOCATION = 0x01 KEYBOARD_LOC_RIGHT KEYBOARD_LOCATION = 0x02 KEYBOARD_LOC_NUMPAD KEYBOARD_LOCATION = 0x03 )
type KeyboardEvent ¶
type KeyboardEvent struct {
UIEvent
}
func CastKeyboardEvent ¶
func CastKeyboardEvent(_jsv js.JSValueProvider) *KeyboardEvent
CastKeyboardEvent is casting a js.Value into KeyboardEvent.
func (*KeyboardEvent) AltKey ¶
func (_this *KeyboardEvent) AltKey() bool
AltKey returning attribute 'altKey' with
func (*KeyboardEvent) CharCode ¶
func (_this *KeyboardEvent) CharCode() uint
CharCode returning attribute 'charCode' with
func (*KeyboardEvent) Code ¶
func (_this *KeyboardEvent) Code() string
Code returning attribute 'code' with
func (*KeyboardEvent) CtrlKey ¶
func (_this *KeyboardEvent) CtrlKey() bool
CtrlKey returning attribute 'ctrlKey' with
func (*KeyboardEvent) GetModifierState ¶
func (_this *KeyboardEvent) GetModifierState(keyArg string) bool
returns the current state of the specified modifier key: true if the modifier is active (that is the modifier key is pressed or locked), otherwise, false.
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState
func (*KeyboardEvent) IsComposing ¶
func (_this *KeyboardEvent) IsComposing() bool
IsComposing returning attribute 'isComposing' with
func (*KeyboardEvent) Key ¶
func (_this *KeyboardEvent) Key() string
Key returning attribute 'key' with
func (*KeyboardEvent) KeyCode ¶
func (_this *KeyboardEvent) KeyCode() uint
KeyCode returning attribute 'keyCode' with
func (*KeyboardEvent) Location ¶
func (_this *KeyboardEvent) Location() KEYBOARD_LOCATION
Location returning attribute 'location' with
func (*KeyboardEvent) MetaKey ¶
func (_this *KeyboardEvent) MetaKey() bool
MetaKey returning attribute 'metaKey' with
func (*KeyboardEvent) Repeat ¶
func (_this *KeyboardEvent) Repeat() bool
Repeat returning attribute 'repeat' with
func (*KeyboardEvent) ShiftKey ¶
func (_this *KeyboardEvent) ShiftKey() bool
ShiftKey returning attribute 'shiftKey' with
type MOUSE_EVENT ¶
type MOUSE_EVENT string
const ( MOUSE_ONCLICK MOUSE_EVENT = "click" MOUSE_ONAUXCLICK MOUSE_EVENT = "auxclick" MOUSE_ONDBLCLICK MOUSE_EVENT = "dblclick" MOUSE_ONMOUSEDOWN MOUSE_EVENT = "mousedown" MOUSE_ONMOUSEENTER MOUSE_EVENT = "mouseenter" MOUSE_ONMOUSELEAVE MOUSE_EVENT = "mouseleave" MOUSE_ONMOUSEMOVE MOUSE_EVENT = "mousemove" MOUSE_ONMOUSEOUT MOUSE_EVENT = "mouseout" MOUSE_ONMOUSEUP MOUSE_EVENT = "mouseup" MOUSE_ONMOUSEOVER MOUSE_EVENT = "mouseover" MOUSE_ONCONTEXTMENU MOUSE_EVENT = "contextmenu" )
type MouseEvent ¶
type MouseEvent struct {
UIEvent
}
func CastMouseEvent ¶
func CastMouseEvent(_jsv js.JSValueProvider) *MouseEvent
CastMouseEvent is casting a js.Value into MouseEvent.
func (*MouseEvent) AltKey ¶
func (_this *MouseEvent) AltKey() bool
AltKey returning attribute 'altKey' with
func (*MouseEvent) Button ¶
func (_this *MouseEvent) Button() int
Button returning attribute 'button' with
func (*MouseEvent) Buttons ¶
func (_this *MouseEvent) Buttons() int
Buttons returning attribute 'buttons' with
func (*MouseEvent) ClientX ¶
func (_this *MouseEvent) ClientX() float64
ClientX returning attribute 'clientX' with
func (*MouseEvent) ClientY ¶
func (_this *MouseEvent) ClientY() float64
ClientY returning attribute 'clientY' with
func (*MouseEvent) CtrlKey ¶
func (_this *MouseEvent) CtrlKey() bool
CtrlKey returning attribute 'ctrlKey' with
func (*MouseEvent) GetModifierState ¶
func (_this *MouseEvent) GetModifierState(keyArg string) bool
func (*MouseEvent) MetaKey ¶
func (_this *MouseEvent) MetaKey() bool
MetaKey returning attribute 'metaKey' with
func (*MouseEvent) MovementX ¶
func (_this *MouseEvent) MovementX() int
MovementX returning attribute 'movementX' with
func (*MouseEvent) MovementY ¶
func (_this *MouseEvent) MovementY() int
MovementY returning attribute 'movementY' with
func (*MouseEvent) OffsetX ¶
func (_this *MouseEvent) OffsetX() float64
OffsetX returning attribute 'offsetX' with
func (*MouseEvent) OffsetY ¶
func (_this *MouseEvent) OffsetY() float64
OffsetY returning attribute 'offsetY' with
func (*MouseEvent) PageX ¶
func (_this *MouseEvent) PageX() float64
PageX returning attribute 'pageX' with
func (*MouseEvent) PageY ¶
func (_this *MouseEvent) PageY() float64
PageY returning attribute 'pageY' with
func (*MouseEvent) RelatedTarget ¶
func (_this *MouseEvent) RelatedTarget() js.JSValue
RelatedTarget returning attribute 'relatedTarget' with
func (*MouseEvent) ScreenX ¶
func (_this *MouseEvent) ScreenX() float64
ScreenX returning attribute 'screenX' with
func (*MouseEvent) ScreenY ¶
func (_this *MouseEvent) ScreenY() float64
ScreenY returning attribute 'screenY' with
func (*MouseEvent) ShiftKey ¶
func (_this *MouseEvent) ShiftKey() bool
ShiftKey returning attribute 'shiftKey' with
type PAGETRANSITION_EVENT ¶
type PAGETRANSITION_EVENT string
const ( PAGETRANSITION_ONPAGEHIDE PAGETRANSITION_EVENT = "pagehide" PAGETRANSITION_ONPAGESHOW PAGETRANSITION_EVENT = "pageshow" )
type POINTER_EVENT ¶
type POINTER_EVENT string
const ( POINTER_ONGOTPOINTERCAPTURE POINTER_EVENT = "gotpointercapture" POINTER_ONLOSTPOINTERCAPTURE POINTER_EVENT = "lostpointercapture" POINTER_ONPOINTERCANCEL POINTER_EVENT = "pointercancel" POINTER_ONPOINTERDOWN POINTER_EVENT = "pointerdown" POINTER_ONPOINTERCENTER POINTER_EVENT = "pointerenter" POINTER_ONPOINTERLEAVE POINTER_EVENT = "pointerleave" POINTER_ONPOINTERMOVE POINTER_EVENT = "pointermove" POINTER_ONPOINTEROUT POINTER_EVENT = "pointerout" POINTER_ONPOINTEROVER POINTER_EVENT = "pointerover" POINTER_ONPOINTERUP POINTER_EVENT = "pointerup" )
type PageTransitionEvent ¶
type PageTransitionEvent struct {
Event
}
The PageTransitionEvent event object is available inside handler functions for the pageshow and pagehide events, fired when a document is being loaded or unloaded.
https://developer.mozilla.org/en-US/docs/Web/API/PageTransitionEvent
func CastPageTransitionEvent ¶
func CastPageTransitionEvent(_jsv js.JSValueProvider) *PageTransitionEvent
CastPageTransitionEvent is casting a js.Value into PageTransitionEvent.
func (*PageTransitionEvent) Persisted ¶
func (_evt *PageTransitionEvent) Persisted() bool
Persisted returning attribute 'persisted' with
type PointerEvent ¶
type PointerEvent struct {
MouseEvent
}
func CastPointerEvent ¶
func CastPointerEvent(_jsv js.JSValueProvider) *PointerEvent
CastPointerEvent is casting a js.Value into PointerEvent.
func (*PointerEvent) Height ¶
func (_this *PointerEvent) Height() float64
Height returning attribute 'height' with
func (*PointerEvent) IsPrimary ¶
func (_this *PointerEvent) IsPrimary() bool
IsPrimary returning attribute 'isPrimary' with
func (*PointerEvent) PointerId ¶
func (_this *PointerEvent) PointerId() int
PointerId returning attribute 'pointerId' with
func (*PointerEvent) PointerType ¶
func (_this *PointerEvent) PointerType() string
PointerType returning attribute 'pointerType' with
func (*PointerEvent) Pressure ¶
func (_this *PointerEvent) Pressure() float64
Pressure returning attribute 'pressure' with
func (*PointerEvent) TangentialPressure ¶
func (_this *PointerEvent) TangentialPressure() float64
TangentialPressure returning attribute 'tangentialPressure' with
func (*PointerEvent) TiltX ¶
func (_this *PointerEvent) TiltX() int
TiltX returning attribute 'tiltX' with
func (*PointerEvent) TiltY ¶
func (_this *PointerEvent) TiltY() int
TiltY returning attribute 'tiltY' with
func (*PointerEvent) Twist ¶
func (_this *PointerEvent) Twist() int
Twist returning attribute 'twist' with
func (*PointerEvent) Width ¶
func (_this *PointerEvent) Width() float64
Width returning attribute 'width' with
type UIEvent ¶
type UIEvent struct {
Event
}
UIEvent represents simple user interface events.
https://developer.mozilla.org/en-US/docs/Web/API/UIEvent
func CastUIEvent ¶
func CastUIEvent(_jsv js.JSValueProvider) *UIEvent
CastUIEvent is casting a js.Value into UIEvent.
func (*UIEvent) Detail ¶
Detail when non-zero, provides the current (or next, depending on the event) click count.
https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/detail
type WHEEL_DELTA_MODE ¶
type WHEEL_DELTA_MODE uint
const ( WHEEL_DELTA_PIXEL WHEEL_DELTA_MODE = 0x00 WHEEL_DELTA_LINE WHEEL_DELTA_MODE = 0x01 WHEEL_DELTA_PAGE WHEEL_DELTA_MODE = 0x02 )
type WheelEvent ¶
type WheelEvent struct {
MouseEvent
}
func CastWheelEvent ¶
func CastWheelEvent(_jsv js.JSValueProvider) *WheelEvent
CastWheelEvent is casting a js.Value into WheelEvent.
func (*WheelEvent) DeltaMode ¶
func (_this *WheelEvent) DeltaMode() WHEEL_DELTA_MODE
DeltaMode returning attribute 'deltaMode' with
func (*WheelEvent) DeltaX ¶
func (_this *WheelEvent) DeltaX() float64
DeltaX returning attribute 'deltaX' with
func (*WheelEvent) DeltaY ¶
func (_this *WheelEvent) DeltaY() float64
DeltaY returning attribute 'deltaY' with
func (*WheelEvent) DeltaZ ¶
func (_this *WheelEvent) DeltaZ() float64
DeltaZ returning attribute 'deltaZ' with