initEvent method

This topic has not yet been rated - Rate this topic

Initializes a new generic event that the createEvent method created.

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

Syntax

object.initEvent(eventType, canBubble, cancelable)

Parameters

eventType [in]

Type: String

The event type.

canBubble [in]

Type: Boolean

true (true)

The event should propagate upward.

false (false)

The event does not propagate upward.

cancelable [in]

Type: Boolean

true (true)

The default action can be canceled.

false (false)

The default action cannot be canceled.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Standards information

Remarks

You can call the initEvent method only before the dispatchEvent method dispatches the event object. After the event is dispatched, its properties cannot be changed.

See also

SVGZoomEvent
BeforeUnloadEvent
CompositionEvent
CustomEvent
Event
DragEvent
FocusEvent
KeyboardEvent
MessageEvent
MouseEvent
MutationEvent
StorageEvent
TextEvent
UIEvent
Reference
bubbles
cancelable
dispatchEvent

 

 

Build date: 11/29/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.