EventWithTarget

@mvuijs/core / EventWithTarget

EventWithTarget<T> #

Type parameters #

  • T extends HTMLElement

Hierarchy #

  • Event.EventWithTarget

Properties #

AT_TARGET #

Readonly number

Inherited from: Event.AT_TARGET

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5221

BUBBLING_PHASE #

Readonly number

Inherited from: Event.BUBBLING_PHASE

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5222

CAPTURING_PHASE #

Readonly number

Inherited from: Event.CAPTURING_PHASE

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5223

NONE #

Readonly number

Inherited from: Event.NONE

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5224

bubbles #

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

Inherited from: Event.bubbles

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5186

cancelBubble #

boolean

Deprecated #

Inherited from: Event.cancelBubble

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5188

cancelable #

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

Inherited from: Event.cancelable

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5190

composed #

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

Inherited from: Event.composed

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5192

currentTarget #

Readonly null | EventTarget

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

Inherited from: Event.currentTarget

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5194

defaultPrevented #

Readonly boolean

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

Inherited from: Event.defaultPrevented

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5196

eventPhase #

Readonly number

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

Inherited from: Event.eventPhase

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5198

isTrusted #

Readonly boolean

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

Inherited from: Event.isTrusted

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5200

returnValue #

boolean

Deprecated #

Inherited from: Event.returnValue

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5202

srcElement #

Readonly null | EventTarget

Deprecated #

Inherited from: Event.srcElement

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5204

target #

T

Overrides: Event.target

Defined in: packages/core/src/template-element.ts:8

timeStamp #

Readonly number

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

Inherited from: Event.timeStamp

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5208

type #

Readonly string

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

Inherited from: Event.type

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5210

Methods #

composedPath() #

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.

Signature #

composedPath(): EventTarget[];

Returns #

EventTarget[]

Inherited from: Event.composedPath

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5212

initEvent() #

Deprecated #

Signature #

initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;

Parameters #

Name Type
type string
bubbles? boolean
cancelable? boolean

Returns #

void

Inherited from: Event.initEvent

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5214

preventDefault() #

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.

Signature #

preventDefault(): void;

Returns #

void

Inherited from: Event.preventDefault

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5216

stopImmediatePropagation() #

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.

Signature #

stopImmediatePropagation(): void;

Returns #

void

Inherited from: Event.stopImmediatePropagation

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5218

stopPropagation() #

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

Signature #

stopPropagation(): void;

Returns #

void

Inherited from: Event.stopPropagation

Defined in: node_modules/typescript/lib/lib.dom.d.ts:5220