Export (0) Print
Expand All

initCompositionEvent method

Initializes a new text composition event that the IDocumentEvent::createEvent method created.

Document Object Model (DOM) Level 3 Events Specification, Section 5.2.7Internet Explorer 9

 

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.

compositionend

Text input is complete. If character data is available, this event is followed by a textInput event with the appropriate IDOMTextEvent::inputMethod value.

compositionstart

A text input system starts composing a passage of text.

compositionupdate

New characters are added to the IDOMCompositionEvent::data attribute. This event is optional depending on the input method.

canBubble [in]

Type: VARIANT_BOOL

VARIANT_TRUE (true)

The event should propagate upward.

VARIANT_FALSE (false)

The event does not propagate upward.

cancelable [in]

Type: VARIANT_BOOL

VARIANT_TRUE (true)

The default action can be canceled.

VARIANT_FALSE (false)

The default action cannot be canceled.

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

 

 

Community Additions

ADD
Show:
© 2014 Microsoft