Back to godoc.org

Package domcore

v0.0.0-...-f312d10
Latest Go to latest

The latest major version is .

Published: Feb 8, 2020 | License: BSD-3-Clause | Module: github.com/gowebapi/webapi

Overview

Pacakge domcore is shared DOM types

Source: DOM Standard (https://dom.spec.whatwg.org/)

Index

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
)

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

type AddEventListenerOptions struct {
	Capture bool
	Passive bool
	Once    bool
}

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

type CustomEventInit struct {
	Bubbles    bool
	Cancelable bool
	Composed   bool
	Detail     js.Value
}

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

type DOMException struct {
	// Value_JS holds a reference to a javascript value
	Value_JS js.Value
}

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

type DOMStringList struct {
	// Value_JS holds a reference to a javascript value
	Value_JS js.Value
}

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

type DOMStringMap struct {
	// Value_JS holds a reference to a javascript value
	Value_JS js.Value
}

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

type DOMTokenList struct {
	// Value_JS holds a reference to a javascript value
	Value_JS js.Value
}

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

type DOMTokenListEntryIteratorValue struct {
	Value []js.Value
	Done  bool
}

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

type DOMTokenListForEach js.Func

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

type DOMTokenListKeyIteratorValue struct {
	Value uint
	Done  bool
}

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

type DOMTokenListValueIteratorValue struct {
	Value string
	Done  bool
}

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

type Event struct {
	// Value_JS holds a reference to a javascript value
	Value_JS js.Value
}

class: Event

func EventFromJS

func EventFromJS(value js.Wrapper) *Event

EventFromJS is casting a js.Wrapper into Event.

func NewEvent

func NewEvent(_type string, eventInitDict *EventInit) (_result *Event)

func (*Event) Bubbles

func (_this *Event) Bubbles() bool

Bubbles returning attribute 'bubbles' with type bool (idl: boolean).

func (*Event) CancelBubble

func (_this *Event) CancelBubble() bool

CancelBubble returning attribute 'cancelBubble' with type bool (idl: boolean).

func (*Event) Cancelable

func (_this *Event) Cancelable() bool

Cancelable returning attribute 'cancelable' with type bool (idl: boolean).

func (*Event) Composed

func (_this *Event) Composed() bool

Composed returning attribute 'composed' 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

func (_this *Event) DefaultPrevented() bool

DefaultPrevented returning attribute 'defaultPrevented' with type bool (idl: boolean).

func (*Event) EventPhase

func (_this *Event) EventPhase() int

EventPhase returning attribute 'eventPhase' with type int (idl: unsigned short).

func (*Event) InitEvent

func (_this *Event) InitEvent(_type string, bubbles *bool, cancelable *bool)

func (*Event) IsTrusted

func (_this *Event) IsTrusted() bool

IsTrusted returning attribute 'isTrusted' with type bool (idl: boolean).

func (*Event) JSValue

func (_this *Event) JSValue() js.Value

func (*Event) PreventDefault

func (_this *Event) PreventDefault()

func (*Event) ReturnValue

func (_this *Event) ReturnValue() bool

ReturnValue returning attribute 'returnValue' with type bool (idl: boolean).

func (*Event) SetCancelBubble

func (_this *Event) SetCancelBubble(value bool)

SetCancelBubble setting attribute 'cancelBubble' with type bool (idl: boolean).

func (*Event) SetReturnValue

func (_this *Event) SetReturnValue(value bool)

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

func (*Event) TimeStamp

func (_this *Event) TimeStamp() float64

TimeStamp returning attribute 'timeStamp' with type float64 (idl: double).

func (*Event) Type

func (_this *Event) Type() string

Type returning attribute 'type' with type string (idl: DOMString).

type EventHandler

type EventHandler js.Func

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

type EventInit struct {
	Bubbles    bool
	Cancelable bool
	Composed   bool
}

dictionary: EventInit

func EventInitFromJS

func EventInitFromJS(value js.Wrapper) *EventInit

EventInitFromJS is allocating a new EventInit object and copy all values from input javascript object

func (*EventInit) JSValue

func (_this *EventInit) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

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

type EventTarget struct {
	// Value_JS holds a reference to a javascript value
	Value_JS js.Value
}

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

type ExtendableEventInit struct {
	Bubbles    bool
	Cancelable bool
	Composed   bool
}

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

type Union struct {
	Value js.Value
}

func UnionFromJS

func UnionFromJS(value js.Value) *Union

func (*Union) JSValue

func (u *Union) JSValue() js.Value

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier