dispatchEvent method

Sends an event to the current element.

Document Object Model (DOM) Level 3 Events Specification, Section 4.3

Syntax

object.dispatchEvent(evt, pfResult)

Parameters

evt [in]

Type: IDOMEvent

The event object to dispatch.

Return value

Type: Boolean

A Boolean value that indicates whether any of the event handlers called preventDefault.

true

Default. The default action is permitted.

false

The caller should prevent the default action.

Standards information

Remarks

Events that the dispatchEvent method dispatches are subject to the same capturing and bubbling behavior as events that the browser dispatches.

You cannot cancel some events. For more information, see the documentation for the event.

See also

window
ApplicationCache
AudioTrackList
document
IDBDatabase
IDBRequest
IDBTransaction
MediaSource
MessagePort
MSMediaKeySession
Node
Screen
SourceBuffer
SourceBufferList
SVGElementInstance
TextNode
TextTrack
TextTrackCue
TextTrackList
WebSocket
Window
Window
WorkerGlobalScope
XMLHttpRequest
Reference
addEventListener
createEvent
initEvent

 

 

Show:
© 2014 Microsoft