createEvent method

[This documentation is preliminary and is subject to change.]

Creates a Document Object Model (DOM) event of the specified type.

The canvas element, Section 1.5Internet Explorer 9

Syntax

HRESULT retVal = object.createEvent(eventType, );

Standards information

Parameters

eventType [in]

Type: BSTR

One of the following values. Case is not important.

Event

Creates a Event object.

Events

Same as Event.

CompositionEvent

Creates a CompositionEvent object.

CustomEvent

Creates a CustomEvent object.

DragEvent

Creates a DragEvent object.

FocusEvent

Creates a FocusEvent object.

KeyboardEvent

Creates a KeyboardEvent object.

MessageEvents

Creates a MessageEvent object.

MouseEvent

Creates a MouseEvent object.

MouseEvents

Same as MouseEvent.

MouseWheelEvent

Creates a MouseWheelEvent object.

MutationEvent

Creates a MutationEvent object.

MutationEvents

Same as MutationEvent.

StorageEvent

Creates a StorageEvent object.

TextEvent

Creates a TextEvent object.

UIEvent

Creates a UIEvent object

UIEvents

Same as UIEvent.

ppEvent [out, retval]

Type: IDOMEvent

The address of a pointer to IDOMEvent that receives the event object.

Return value

Type: HRESULT

This method can return one of these values.

Return code Description
S_OK

The operation completed successfully.

 

Remarks

If the event object is to be dispatched with dispatchEvent, the appropriate event initialization method must be called. For example, after creating an event of type UIEvent, call initUIEvent to initialize the event object's values.

**Security Warning:  **For security reasons, events generated with createEvent are untrusted and have a isTrusted value of VARIANT_FALSE.

See also

Reference

initCompositionEvent

initCustomEvent

initDragEvent

initEvent

initFocusEvent

initKeyboardEvent

initMessageEvent

initMouseEvent

initMouseWheelEvent

initMutationEvent

initStorageEvent

initTextEvent

initUIEvent

initWheelEvent

 

 

Build date: 1/23/2012