Documentation ¶
Overview ¶
Pacakge domcore is shared DOM types
Source: DOM Standard (https://dom.spec.whatwg.org/)
Index ¶
- Constants
- type AbortController
- type AbortSignal
- func (_this *AbortSignal) Aborted() bool
- func (_this *AbortSignal) AddEventAbort(listener func(event *Event, currentTarget *AbortSignal)) js.Func
- func (_this *AbortSignal) OnAbort() EventHandlerFunc
- func (_this *AbortSignal) SetOnAbort(listener func(event *Event, currentTarget *AbortSignal)) js.Func
- type AddEventListenerOptions
- type CustomEvent
- type CustomEventInit
- type DOMException
- type DOMStringList
- type DOMStringMap
- type DOMTokenList
- func (_this *DOMTokenList) Add(tokens ...string)
- func (_this *DOMTokenList) Contains(token string) (_result bool)
- func (_this *DOMTokenList) Entries() (_result *DOMTokenListEntryIterator)
- func (_this *DOMTokenList) ForEach(callback *DOMTokenListForEach, optionalThisForCallbackArgument interface{})
- func (_this *DOMTokenList) Index(index uint) (_result *string)
- func (_this *DOMTokenList) Item(index uint) (_result *string)
- func (_this *DOMTokenList) JSValue() js.Value
- func (_this *DOMTokenList) Keys() (_result *DOMTokenListKeyIterator)
- func (_this *DOMTokenList) Length() uint
- func (_this *DOMTokenList) Remove(tokens ...string)
- func (_this *DOMTokenList) Replace(token string, newToken string) (_result bool)
- func (_this *DOMTokenList) SetValue(value string)
- func (_this *DOMTokenList) Supports(token string) (_result bool)
- func (_this *DOMTokenList) ToString() string
- func (_this *DOMTokenList) Toggle(token string, force *bool) (_result bool)
- func (_this *DOMTokenList) Value() string
- func (_this *DOMTokenList) Values() (_result *DOMTokenListValueIterator)
- type DOMTokenListEntryIterator
- type DOMTokenListEntryIteratorValue
- type DOMTokenListForEach
- type DOMTokenListForEachFunc
- type DOMTokenListKeyIterator
- type DOMTokenListKeyIteratorValue
- type DOMTokenListValueIterator
- type DOMTokenListValueIteratorValue
- type Event
- func (_this *Event) Bubbles() bool
- func (_this *Event) CancelBubble() bool
- func (_this *Event) Cancelable() bool
- func (_this *Event) Composed() bool
- func (_this *Event) ComposedPath() (_result []*EventTarget)
- func (_this *Event) CurrentTarget() *EventTarget
- func (_this *Event) DefaultPrevented() bool
- func (_this *Event) EventPhase() int
- func (_this *Event) InitEvent(_type string, bubbles *bool, cancelable *bool)
- func (_this *Event) IsTrusted() bool
- func (_this *Event) JSValue() js.Value
- func (_this *Event) PreventDefault()
- func (_this *Event) ReturnValue() bool
- func (_this *Event) SetCancelBubble(value bool)
- func (_this *Event) SetReturnValue(value bool)
- func (_this *Event) SrcElement() *EventTarget
- func (_this *Event) StopImmediatePropagation()
- func (_this *Event) StopPropagation()
- func (_this *Event) Target() *EventTarget
- func (_this *Event) TimeStamp() float64
- func (_this *Event) Type() string
- type EventHandler
- type EventHandlerFunc
- type EventInit
- type EventListener
- type EventListenerOptions
- type EventListenerValue
- type EventTarget
- func (_this *EventTarget) AddEventListener(_type string, callback *EventListenerValue, options *Union)
- func (_this *EventTarget) DispatchEvent(event *Event) (_result bool)
- func (_this *EventTarget) JSValue() js.Value
- func (_this *EventTarget) RemoveEventListener(_type string, callback *EventListenerValue, options *Union)
- type ExtendableEvent
- type ExtendableEventInit
- type Union
- type VisibilityState
Constants ¶
const ( INDEX_SIZE_ERR int = 1 DOMSTRING_SIZE_ERR int = 2 HIERARCHY_REQUEST_ERR int = 3 WRONG_DOCUMENT_ERR int = 4 INVALID_CHARACTER_ERR int = 5 NO_DATA_ALLOWED_ERR int = 6 NO_MODIFICATION_ALLOWED_ERR int = 7 NOT_FOUND_ERR int = 8 NOT_SUPPORTED_ERR int = 9 INUSE_ATTRIBUTE_ERR int = 10 INVALID_STATE_ERR int = 11 SYNTAX_ERR int = 12 INVALID_MODIFICATION_ERR int = 13 NAMESPACE_ERR int = 14 INVALID_ACCESS_ERR int = 15 VALIDATION_ERR int = 16 TYPE_MISMATCH_ERR int = 17 SECURITY_ERR int = 18 NETWORK_ERR int = 19 ABORT_ERR int = 20 URL_MISMATCH_ERR int = 21 QUOTA_EXCEEDED_ERR int = 22 TIMEOUT_ERR int = 23 INVALID_NODE_TYPE_ERR int = 24 DATA_CLONE_ERR int = 25 )
const ( NONE int = 0 CAPTURING_PHASE int = 1 AT_TARGET int = 2 BUBBLING_PHASE int = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbortController ¶
type AbortController struct { // Value_JS holds a reference to a javascript value Value_JS js.Value }
class: AbortController
func AbortControllerFromJS ¶
func AbortControllerFromJS(value js.Wrapper) *AbortController
AbortControllerFromJS is casting a js.Wrapper into AbortController.
func NewAbortController ¶
func NewAbortController() (_result *AbortController)
func (*AbortController) Abort ¶
func (_this *AbortController) Abort()
func (*AbortController) JSValue ¶
func (_this *AbortController) JSValue() js.Value
func (*AbortController) Signal ¶
func (_this *AbortController) Signal() *AbortSignal
Signal returning attribute 'signal' with type AbortSignal (idl: AbortSignal).
type AbortSignal ¶
type AbortSignal struct {
EventTarget
}
class: AbortSignal
func AbortSignalFromJS ¶
func AbortSignalFromJS(value js.Wrapper) *AbortSignal
AbortSignalFromJS is casting a js.Wrapper into AbortSignal.
func (*AbortSignal) Aborted ¶
func (_this *AbortSignal) Aborted() bool
Aborted returning attribute 'aborted' with type bool (idl: boolean).
func (*AbortSignal) AddEventAbort ¶
func (_this *AbortSignal) AddEventAbort(listener func(event *Event, currentTarget *AbortSignal)) js.Func
AddAbort is adding doing AddEventListener for 'Abort' on target. This method is returning allocated javascript function that need to be released.
func (*AbortSignal) OnAbort ¶
func (_this *AbortSignal) OnAbort() EventHandlerFunc
OnAbort returning attribute 'onabort' with type EventHandler (idl: EventHandlerNonNull).
func (*AbortSignal) SetOnAbort ¶
func (_this *AbortSignal) SetOnAbort(listener func(event *Event, currentTarget *AbortSignal)) js.Func
SetOnAbort is assigning a function to 'onabort'. This This method is returning allocated javascript function that need to be released.
type AddEventListenerOptions ¶
dictionary: AddEventListenerOptions
func AddEventListenerOptionsFromJS ¶
func AddEventListenerOptionsFromJS(value js.Wrapper) *AddEventListenerOptions
AddEventListenerOptionsFromJS is allocating a new AddEventListenerOptions object and copy all values from input javascript object
func (*AddEventListenerOptions) JSValue ¶
func (_this *AddEventListenerOptions) JSValue() js.Value
JSValue is allocating a new javasript object and copy all values
type CustomEvent ¶
type CustomEvent struct {
Event
}
class: CustomEvent
func CustomEventFromJS ¶
func CustomEventFromJS(value js.Wrapper) *CustomEvent
CustomEventFromJS is casting a js.Wrapper into CustomEvent.
func NewCustomEvent ¶
func NewCustomEvent(_type string, eventInitDict *CustomEventInit) (_result *CustomEvent)
func (*CustomEvent) Detail ¶
func (_this *CustomEvent) Detail() js.Value
Detail returning attribute 'detail' with type Any (idl: any).
func (*CustomEvent) InitCustomEvent ¶
func (_this *CustomEvent) InitCustomEvent(_type string, bubbles *bool, cancelable *bool, detail interface{})
type CustomEventInit ¶
dictionary: CustomEventInit
func CustomEventInitFromJS ¶
func CustomEventInitFromJS(value js.Wrapper) *CustomEventInit
CustomEventInitFromJS is allocating a new CustomEventInit object and copy all values from input javascript object
func (*CustomEventInit) JSValue ¶
func (_this *CustomEventInit) JSValue() js.Value
JSValue is allocating a new javasript object and copy all values
type DOMException ¶
class: DOMException
func DOMExceptionFromJS ¶
func DOMExceptionFromJS(value js.Wrapper) *DOMException
DOMExceptionFromJS is casting a js.Wrapper into DOMException.
func NewDOMException ¶
func NewDOMException(message *string, name *string) (_result *DOMException)
func (*DOMException) Code ¶
func (_this *DOMException) Code() int
Code returning attribute 'code' with type int (idl: unsigned short).
func (*DOMException) JSValue ¶
func (_this *DOMException) JSValue() js.Value
func (*DOMException) Message ¶
func (_this *DOMException) Message() string
Message returning attribute 'message' with type string (idl: DOMString).
func (*DOMException) Name ¶
func (_this *DOMException) Name() string
Name returning attribute 'name' with type string (idl: DOMString).
type DOMStringList ¶
class: DOMStringList
func DOMStringListFromJS ¶
func DOMStringListFromJS(value js.Wrapper) *DOMStringList
DOMStringListFromJS is casting a js.Wrapper into DOMStringList.
func (*DOMStringList) Contains ¶
func (_this *DOMStringList) Contains(string string) (_result bool)
func (*DOMStringList) Index ¶
func (_this *DOMStringList) Index(index uint) (_result *string)
func (*DOMStringList) Item ¶
func (_this *DOMStringList) Item(index uint) (_result *string)
func (*DOMStringList) JSValue ¶
func (_this *DOMStringList) JSValue() js.Value
func (*DOMStringList) Length ¶
func (_this *DOMStringList) Length() uint
Length returning attribute 'length' with type uint (idl: unsigned long).
type DOMStringMap ¶
class: DOMStringMap
func DOMStringMapFromJS ¶
func DOMStringMapFromJS(value js.Wrapper) *DOMStringMap
DOMStringMapFromJS is casting a js.Wrapper into DOMStringMap.
func (*DOMStringMap) Delete ¶
func (_this *DOMStringMap) Delete(name string)
func (*DOMStringMap) Get ¶
func (_this *DOMStringMap) Get(name string) (_result string)
func (*DOMStringMap) JSValue ¶
func (_this *DOMStringMap) JSValue() js.Value
func (*DOMStringMap) Set ¶
func (_this *DOMStringMap) Set(name string, value string)
type DOMTokenList ¶
class: DOMTokenList
func DOMTokenListFromJS ¶
func DOMTokenListFromJS(value js.Wrapper) *DOMTokenList
DOMTokenListFromJS is casting a js.Wrapper into DOMTokenList.
func (*DOMTokenList) Add ¶
func (_this *DOMTokenList) Add(tokens ...string)
func (*DOMTokenList) Contains ¶
func (_this *DOMTokenList) Contains(token string) (_result bool)
func (*DOMTokenList) Entries ¶
func (_this *DOMTokenList) Entries() (_result *DOMTokenListEntryIterator)
func (*DOMTokenList) ForEach ¶
func (_this *DOMTokenList) ForEach(callback *DOMTokenListForEach, optionalThisForCallbackArgument interface{})
func (*DOMTokenList) Index ¶
func (_this *DOMTokenList) Index(index uint) (_result *string)
func (*DOMTokenList) Item ¶
func (_this *DOMTokenList) Item(index uint) (_result *string)
func (*DOMTokenList) JSValue ¶
func (_this *DOMTokenList) JSValue() js.Value
func (*DOMTokenList) Keys ¶
func (_this *DOMTokenList) Keys() (_result *DOMTokenListKeyIterator)
func (*DOMTokenList) Length ¶
func (_this *DOMTokenList) Length() uint
Length returning attribute 'length' with type uint (idl: unsigned long).
func (*DOMTokenList) Remove ¶
func (_this *DOMTokenList) Remove(tokens ...string)
func (*DOMTokenList) Replace ¶
func (_this *DOMTokenList) Replace(token string, newToken string) (_result bool)
func (*DOMTokenList) SetValue ¶
func (_this *DOMTokenList) SetValue(value string)
SetValue setting attribute 'value' with type string (idl: DOMString).
func (*DOMTokenList) Supports ¶
func (_this *DOMTokenList) Supports(token string) (_result bool)
func (*DOMTokenList) ToString ¶
func (_this *DOMTokenList) ToString() string
ToString is an alias for Value.
func (*DOMTokenList) Toggle ¶
func (_this *DOMTokenList) Toggle(token string, force *bool) (_result bool)
func (*DOMTokenList) Value ¶
func (_this *DOMTokenList) Value() string
Value returning attribute 'value' with type string (idl: DOMString).
func (*DOMTokenList) Values ¶
func (_this *DOMTokenList) Values() (_result *DOMTokenListValueIterator)
type DOMTokenListEntryIterator ¶
type DOMTokenListEntryIterator struct { // Value_JS holds a reference to a javascript value Value_JS js.Value }
class: DOMTokenListEntryIterator
func DOMTokenListEntryIteratorFromJS ¶
func DOMTokenListEntryIteratorFromJS(value js.Wrapper) *DOMTokenListEntryIterator
DOMTokenListEntryIteratorFromJS is casting a js.Wrapper into DOMTokenListEntryIterator.
func (*DOMTokenListEntryIterator) JSValue ¶
func (_this *DOMTokenListEntryIterator) JSValue() js.Value
func (*DOMTokenListEntryIterator) Next ¶
func (_this *DOMTokenListEntryIterator) Next() (_result *DOMTokenListEntryIteratorValue)
type DOMTokenListEntryIteratorValue ¶
dictionary: DOMTokenListEntryIteratorValue
func DOMTokenListEntryIteratorValueFromJS ¶
func DOMTokenListEntryIteratorValueFromJS(value js.Wrapper) *DOMTokenListEntryIteratorValue
DOMTokenListEntryIteratorValueFromJS is allocating a new DOMTokenListEntryIteratorValue object and copy all values from input javascript object
func (*DOMTokenListEntryIteratorValue) JSValue ¶
func (_this *DOMTokenListEntryIteratorValue) JSValue() js.Value
JSValue is allocating a new javasript object and copy all values
type DOMTokenListForEach ¶
DOMTokenListForEach is a javascript function type.
Call Release() when done to release resouces allocated to this type.
func DOMTokenListForEachToJS ¶
func DOMTokenListForEachToJS(callback DOMTokenListForEachFunc) *DOMTokenListForEach
type DOMTokenListForEachFunc ¶
type DOMTokenListForEachFunc func(currentValue string, currentIndex int, listObj *DOMTokenList)
callback: DOMTokenListForEach
func DOMTokenListForEachFromJS ¶
func DOMTokenListForEachFromJS(_value js.Value) DOMTokenListForEachFunc
type DOMTokenListKeyIterator ¶
type DOMTokenListKeyIterator struct { // Value_JS holds a reference to a javascript value Value_JS js.Value }
class: DOMTokenListKeyIterator
func DOMTokenListKeyIteratorFromJS ¶
func DOMTokenListKeyIteratorFromJS(value js.Wrapper) *DOMTokenListKeyIterator
DOMTokenListKeyIteratorFromJS is casting a js.Wrapper into DOMTokenListKeyIterator.
func (*DOMTokenListKeyIterator) JSValue ¶
func (_this *DOMTokenListKeyIterator) JSValue() js.Value
func (*DOMTokenListKeyIterator) Next ¶
func (_this *DOMTokenListKeyIterator) Next() (_result *DOMTokenListKeyIteratorValue)
type DOMTokenListKeyIteratorValue ¶
dictionary: DOMTokenListKeyIteratorValue
func DOMTokenListKeyIteratorValueFromJS ¶
func DOMTokenListKeyIteratorValueFromJS(value js.Wrapper) *DOMTokenListKeyIteratorValue
DOMTokenListKeyIteratorValueFromJS is allocating a new DOMTokenListKeyIteratorValue object and copy all values from input javascript object
func (*DOMTokenListKeyIteratorValue) JSValue ¶
func (_this *DOMTokenListKeyIteratorValue) JSValue() js.Value
JSValue is allocating a new javasript object and copy all values
type DOMTokenListValueIterator ¶
type DOMTokenListValueIterator struct { // Value_JS holds a reference to a javascript value Value_JS js.Value }
class: DOMTokenListValueIterator
func DOMTokenListValueIteratorFromJS ¶
func DOMTokenListValueIteratorFromJS(value js.Wrapper) *DOMTokenListValueIterator
DOMTokenListValueIteratorFromJS is casting a js.Wrapper into DOMTokenListValueIterator.
func (*DOMTokenListValueIterator) JSValue ¶
func (_this *DOMTokenListValueIterator) JSValue() js.Value
func (*DOMTokenListValueIterator) Next ¶
func (_this *DOMTokenListValueIterator) Next() (_result *DOMTokenListValueIteratorValue)
type DOMTokenListValueIteratorValue ¶
dictionary: DOMTokenListValueIteratorValue
func DOMTokenListValueIteratorValueFromJS ¶
func DOMTokenListValueIteratorValueFromJS(value js.Wrapper) *DOMTokenListValueIteratorValue
DOMTokenListValueIteratorValueFromJS is allocating a new DOMTokenListValueIteratorValue object and copy all values from input javascript object
func (*DOMTokenListValueIteratorValue) JSValue ¶
func (_this *DOMTokenListValueIteratorValue) JSValue() js.Value
JSValue is allocating a new javasript object and copy all values
type Event ¶
class: Event
func EventFromJS ¶
EventFromJS is casting a js.Wrapper into Event.
func (*Event) CancelBubble ¶
CancelBubble returning attribute 'cancelBubble' with type bool (idl: boolean).
func (*Event) Cancelable ¶
Cancelable returning attribute 'cancelable' with type bool (idl: boolean).
func (*Event) ComposedPath ¶
func (_this *Event) ComposedPath() (_result []*EventTarget)
func (*Event) CurrentTarget ¶
func (_this *Event) CurrentTarget() *EventTarget
CurrentTarget returning attribute 'currentTarget' with type EventTarget (idl: EventTarget).
func (*Event) DefaultPrevented ¶
DefaultPrevented returning attribute 'defaultPrevented' with type bool (idl: boolean).
func (*Event) EventPhase ¶
EventPhase returning attribute 'eventPhase' with type int (idl: unsigned short).
func (*Event) PreventDefault ¶
func (_this *Event) PreventDefault()
func (*Event) ReturnValue ¶
ReturnValue returning attribute 'returnValue' with type bool (idl: boolean).
func (*Event) SetCancelBubble ¶
SetCancelBubble setting attribute 'cancelBubble' with type bool (idl: boolean).
func (*Event) SetReturnValue ¶
SetReturnValue setting attribute 'returnValue' with type bool (idl: boolean).
func (*Event) SrcElement ¶
func (_this *Event) SrcElement() *EventTarget
SrcElement returning attribute 'srcElement' with type EventTarget (idl: EventTarget).
func (*Event) StopImmediatePropagation ¶
func (_this *Event) StopImmediatePropagation()
func (*Event) StopPropagation ¶
func (_this *Event) StopPropagation()
func (*Event) Target ¶
func (_this *Event) Target() *EventTarget
Target returning attribute 'target' with type EventTarget (idl: EventTarget).
type EventHandler ¶
EventHandler is a javascript function type.
Call Release() when done to release resouces allocated to this type.
func EventHandlerToJS ¶
func EventHandlerToJS(callback EventHandlerFunc) *EventHandler
type EventHandlerFunc ¶
type EventHandlerFunc func(event *Event) interface{}
callback: EventHandlerNonNull
func EventHandlerFromJS ¶
func EventHandlerFromJS(_value js.Value) EventHandlerFunc
type EventInit ¶
dictionary: EventInit
func EventInitFromJS ¶
EventInitFromJS is allocating a new EventInit object and copy all values from input javascript object
type EventListener ¶
type EventListener interface {
HandleEvent(event *Event)
}
EventListener is a callback interface.
type EventListenerOptions ¶
type EventListenerOptions struct {
Capture bool
}
dictionary: EventListenerOptions
func EventListenerOptionsFromJS ¶
func EventListenerOptionsFromJS(value js.Wrapper) *EventListenerOptions
EventListenerOptionsFromJS is allocating a new EventListenerOptions object and copy all values from input javascript object
func (*EventListenerOptions) JSValue ¶
func (_this *EventListenerOptions) JSValue() js.Value
JSValue is allocating a new javasript object and copy all values
type EventListenerValue ¶
type EventListenerValue struct { // Value is the underlying javascript object or function. Value js.Value // Functions is the underlying function objects that is allocated for the interface callback Functions [1]js.Func // contains filtered or unexported fields }
EventListenerValue is javascript reference value for callback interface EventListener. This is holding the underlaying javascript object.
func EventListenerFromJS ¶
func EventListenerFromJS(value js.Wrapper) *EventListenerValue
EventListenerFromJS is taking an javascript object that reference to a callback interface and return a corresponding interface that can be used to invoke on that element.
func NewEventListener ¶
func NewEventListener(callback EventListener) *EventListenerValue
NewEventListener is allocating a new javascript object that implements EventListener.
func NewEventListenerFunc ¶
func NewEventListenerFunc(f func(event *Event)) *EventListenerValue
NewEventListenerFunc is allocating a new javascript function is implements EventListener interface.
func (*EventListenerValue) HandleEvent ¶
func (_this *EventListenerValue) HandleEvent(event *Event)
func (*EventListenerValue) JSValue ¶
func (t *EventListenerValue) JSValue() js.Value
JSValue is returning the javascript object that implements this callback interface
func (*EventListenerValue) Release ¶
func (t *EventListenerValue) Release()
Release is releasing all resources that is allocated.
type EventTarget ¶
class: EventTarget
func EventTargetFromJS ¶
func EventTargetFromJS(value js.Wrapper) *EventTarget
EventTargetFromJS is casting a js.Wrapper into EventTarget.
func NewEventTarget ¶
func NewEventTarget() (_result *EventTarget)
func (*EventTarget) AddEventListener ¶
func (_this *EventTarget) AddEventListener(_type string, callback *EventListenerValue, options *Union)
func (*EventTarget) DispatchEvent ¶
func (_this *EventTarget) DispatchEvent(event *Event) (_result bool)
func (*EventTarget) JSValue ¶
func (_this *EventTarget) JSValue() js.Value
func (*EventTarget) RemoveEventListener ¶
func (_this *EventTarget) RemoveEventListener(_type string, callback *EventListenerValue, options *Union)
type ExtendableEvent ¶
type ExtendableEvent struct {
Event
}
class: ExtendableEvent
func ExtendableEventFromJS ¶
func ExtendableEventFromJS(value js.Wrapper) *ExtendableEvent
ExtendableEventFromJS is casting a js.Wrapper into ExtendableEvent.
func NewExtendableEvent ¶
func NewExtendableEvent(_type string, eventInitDict *ExtendableEventInit) (_result *ExtendableEvent)
func (*ExtendableEvent) WaitUntil ¶
func (_this *ExtendableEvent) WaitUntil(f *javascript.Promise)
type ExtendableEventInit ¶
dictionary: ExtendableEventInit
func ExtendableEventInitFromJS ¶
func ExtendableEventInitFromJS(value js.Wrapper) *ExtendableEventInit
ExtendableEventInitFromJS is allocating a new ExtendableEventInit object and copy all values from input javascript object
func (*ExtendableEventInit) JSValue ¶
func (_this *ExtendableEventInit) JSValue() js.Value
JSValue is allocating a new javasript object and copy all values
type Union ¶
func UnionFromJS ¶
type VisibilityState ¶
type VisibilityState int
enum: VisibilityState
const ( HiddenVisibilityState VisibilityState = iota VisibleVisibilityState PrerenderVisibilityState )
func VisibilityStateFromJS ¶
func VisibilityStateFromJS(value js.Value) VisibilityState
VisibilityStateFromJS is converting a javascript value into a VisibilityState enum value.
func (*VisibilityState) JSValue ¶
func (this *VisibilityState) JSValue() js.Value
JSValue is converting this enum into a javascript object
func (VisibilityState) Value ¶
func (this VisibilityState) Value() string
Value is converting this into javascript defined string value