Skip to main content

Class: OdinEvent<T>

Custom Event providing Odin Event Payload of a provided type.

Extends

  • Event

Type Parameters

T

Implements

Constructors

new OdinEvent()

new OdinEvent<T>(type, payload): OdinEvent<T>

Parameters

type: string

payload: T

Returns

OdinEvent<T>

Overrides

Event.constructor

Defined in

Odin/odin-typescript/lib/utils/odin-event-target.d.ts:15

Properties

AT_TARGET

readonly AT_TARGET: 2

Implementation of

IOdinEvent.AT_TARGET

Inherited from

Event.AT_TARGET

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8226


bubbles

readonly bubbles: boolean

Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise.

MDN Reference

Implementation of

IOdinEvent.bubbles

Inherited from

Event.bubbles

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8121


BUBBLING_PHASE

readonly BUBBLING_PHASE: 3

Implementation of

IOdinEvent.BUBBLING_PHASE

Inherited from

Event.BUBBLING_PHASE

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8227


cancelable

readonly cancelable: boolean

Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method.

MDN Reference

Implementation of

IOdinEvent.cancelable

Inherited from

Event.cancelable

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8133


cancelBubble

cancelBubble: boolean

Deprecated

MDN Reference

Implementation of

IOdinEvent.cancelBubble

Inherited from

Event.cancelBubble

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8127


CAPTURING_PHASE

readonly CAPTURING_PHASE: 1

Implementation of

IOdinEvent.CAPTURING_PHASE

Inherited from

Event.CAPTURING_PHASE

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8225


composed

readonly composed: boolean

Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise.

MDN Reference

Implementation of

IOdinEvent.composed

Inherited from

Event.composed

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8139


currentTarget

readonly currentTarget: EventTarget

Returns the object whose event listener's callback is currently being invoked.

MDN Reference

Implementation of

IOdinEvent.currentTarget

Inherited from

Event.currentTarget

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8145


defaultPrevented

readonly defaultPrevented: boolean

Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise.

MDN Reference

Implementation of

IOdinEvent.defaultPrevented

Inherited from

Event.defaultPrevented

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8151


eventPhase

readonly eventPhase: number

Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE.

MDN Reference

Implementation of

IOdinEvent.eventPhase

Inherited from

Event.eventPhase

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8157


isTrusted

readonly isTrusted: boolean

Returns true if event was dispatched by the user agent, and false otherwise.

MDN Reference

Implementation of

IOdinEvent.isTrusted

Inherited from

Event.isTrusted

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8163


NONE

readonly NONE: 0

Implementation of

IOdinEvent.NONE

Inherited from

Event.NONE

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8224


payload

readonly payload: T

Custom payload of the event (see IOdin*Payload interfaces).

Implementation of

IOdinEvent.payload

Defined in

Odin/odin-typescript/lib/utils/odin-event-target.d.ts:14


returnValue

returnValue: boolean

Deprecated

MDN Reference

Implementation of

IOdinEvent.returnValue

Inherited from

Event.returnValue

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8169


srcElement

readonly srcElement: EventTarget

Deprecated

MDN Reference

Implementation of

IOdinEvent.srcElement

Inherited from

Event.srcElement

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8175


target

readonly target: EventTarget

Returns the object to which event is dispatched (its target).

MDN Reference

Implementation of

IOdinEvent.target

Inherited from

Event.target

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8181


timeStamp

readonly timeStamp: number

Returns the event's timestamp as the number of milliseconds measured relative to the time origin.

MDN Reference

Implementation of

IOdinEvent.timeStamp

Inherited from

Event.timeStamp

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8187


type

readonly type: string

Returns the type of event, e.g. "click", "hashchange", or "submit".

MDN Reference

Implementation of

IOdinEvent.type

Inherited from

Event.type

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8193


AT_TARGET

readonly static AT_TARGET: 2

Inherited from

Event.AT_TARGET

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8235


BUBBLING_PHASE

readonly static BUBBLING_PHASE: 3

Inherited from

Event.BUBBLING_PHASE

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8236


CAPTURING_PHASE

readonly static CAPTURING_PHASE: 1

Inherited from

Event.CAPTURING_PHASE

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8234


NONE

readonly static NONE: 0

Inherited from

Event.NONE

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8233

Methods

composedPath()

composedPath(): EventTarget[]

Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget.

MDN Reference

Returns

EventTarget[]

Implementation of

IOdinEvent.composedPath

Inherited from

Event.composedPath

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8199


initEvent()

initEvent(type, bubbles?, cancelable?): void

Parameters

type: string

bubbles?: boolean

cancelable?: boolean

Returns

void

Deprecated

MDN Reference

Implementation of

IOdinEvent.initEvent

Inherited from

Event.initEvent

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8205


preventDefault()

preventDefault(): void

If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.

MDN Reference

Returns

void

Implementation of

IOdinEvent.preventDefault

Inherited from

Event.preventDefault

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8211


stopImmediatePropagation()

stopImmediatePropagation(): void

Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.

MDN Reference

Returns

void

Implementation of

IOdinEvent.stopImmediatePropagation

Inherited from

Event.stopImmediatePropagation

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8217


stopPropagation()

stopPropagation(): void

When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.

MDN Reference

Returns

void

Implementation of

IOdinEvent.stopPropagation

Inherited from

Event.stopPropagation

Defined in

dev-docu/node_modules/typescript/lib/lib.dom.d.ts:8223