initCompositionEvent method
Initializes a new text composition event that the IDocumentEvent::createEvent method created.
![]() ![]() |
Syntax
HRESULT retVal = object.initCompositionEvent(eventType, canBubble, cancelable, viewArg, data, locale);
Parameters
- eventType [in]
-
Type: BSTR
One of the following values, or a user-defined custom event type.
-
Text input is complete. If character data is available, this event is followed by a
textInputevent with the appropriate IDOMTextEvent::inputMethod value. -
A text input system starts composing a passage of text.
-
New characters are added to the IDOMCompositionEvent::data attribute. This event is optional depending on the input method.
- canBubble [in]
-
Type: VARIANT_BOOL
- cancelable [in]
-
Type: VARIANT_BOOL
- viewArg [in]
-
Type: IHTMLWindow2
The address of a pointer to an IHTMLWindow2 variable that specifies the active window, or NULL. This value is returned in the IDOMUIEvent::view attribute of the event. - data [in]
-
Type: BSTR
The composition data. This value is returned in the IDOMCompositionEvent::data attribute of the event.
- locale [in]
-
Type: BSTR
The locale name. This value is returned in the IDOMCompositionEvent::locale attribute of the event.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Standards information
- Document Object Model (DOM) Level 3 Events Specification, Section 5.2.7

