Event

Module: JavaScript DOM API

#include <Event.idl>

Inherited by AnimationEvent, CustomEvent, ErrorEvent, PopStateEvent, ProgressEvent, PromiseRejectionEvent, TransitionEvent, UIEvent

Public Functions

Name
EventEvent(DOMInternedString type, optional EventInit initEvent)
voidstopPropagation()
voidpreventDefault()
voidinitEvent(optional DOMInternedString eventTypeArg, optional boolean canBubbleArg, optional boolean cancelableArg)
voidstopImmediatePropagation()

Public Attributes

Name
const unsigned shortNONE
const unsigned shortCAPTURING_PHASE
const unsigned shortAT_TARGET
const unsigned shortBUBBLING_PHASE
readonly attribute DOMStringtype
readonly attribute EventTargettarget
readonly attribute EventTargetcurrentTarget
readonly attribute unsigned shorteventPhase
readonly attribute booleanbubbles
readonly attribute booleancancelable
readonly attribute booleandefaultPrevented

Public Functions Documentation

function Event

Event Event(
    DOMInternedString type,
    optional EventInit initEvent
)

function stopPropagation

void stopPropagation()

function preventDefault

void preventDefault()

function initEvent

void initEvent(
    optional DOMInternedString eventTypeArg,
    optional boolean canBubbleArg,
    optional boolean cancelableArg
)

function stopImmediatePropagation

void stopImmediatePropagation()

Public Attributes Documentation

variable NONE

const unsigned short NONE = 0;

variable CAPTURING_PHASE

const unsigned short CAPTURING_PHASE = 1;

variable AT_TARGET

const unsigned short AT_TARGET = 2;

variable BUBBLING_PHASE

const unsigned short BUBBLING_PHASE = 3;

variable type

readonly attribute DOMString type;

variable target

readonly attribute EventTarget target;

variable currentTarget

readonly attribute EventTarget currentTarget;

variable eventPhase

readonly attribute unsigned short eventPhase;

variable bubbles

readonly attribute boolean bubbles;

variable cancelable

readonly attribute boolean cancelable;

variable defaultPrevented

readonly attribute boolean defaultPrevented;