Creates a Document Object Model (DOM) event of the specified type.
HRESULT retVal = object.createEvent(eventType, ppEvent);
One of the following values. Case is not important.
Creates a Event object.
Same as Event.
Creates a CompositionEvent object.
Creates a CustomEvent object.
Creates a DragEvent object.
Creates a FocusEvent object.
Creates a KeyboardEvent object.
Creates a MessageEvent object.
Creates a MouseEvent object.
Same as MouseEvent.
Creates a MouseWheelEvent object.
Creates a MutationEvent object.
Same as MutationEvent.
Creates a StorageEvent object.
Creates a TextEvent object.
Creates a UIEvent object
Same as UIEvent.
ppEvent [out, retval]
The address of a pointer to IDOMEvent that receives the event object.
This method can return one of these values.
The operation completed successfully.
- The canvas element, Section 1.5
If the event object is to be dispatched with IEventTarget::dispatchEvent, the appropriate event initialization method must be called. For example, after creating an event of type UIEvent, call IDOMUIEvent::initUIEvent to initialize the event object's values.
Security Warning: For security reasons, events generated with IDocumentEvent::createEvent are untrusted and have a IDOMEvent::isTrusted value of VARIANT_FALSE.