dispatchEvent

The dispatchEvent JS EventTarget dispatches a synthetic event event to target and returns true if either event’s cancelable attribute value is false or its preventDefault() method was not invoked; otherwise false.

Syntax

target.dispatchEvent(event)

Parameters

event

It allows for signaling that something has occurred.

Examples

1 · true

2 · false

addEventListener

EventTarget

removeEventListener

Web Hypertext Application Technology Working Group (WHATWG)

Home Menu