Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

initCompositionEvent method

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

Important  As of Microsoft Edge, the createEvent()/initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information.
 
Document Object Model (DOM) Level 3 Events Specification, Section 5.2.7Internet Explorer 9

 

Syntax

var retval = CompositionEvent.initCompositionEvent(eventType, canBubble, cancelable, viewArg, data, locale);

Parameters

eventType [in]

Type: String

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 inputMethod value.

compositionstart

A text input system starts composing a passage of text.

compositionupdate

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

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.

viewArg [in]

Type: IHTMLWindow2

The active window object or null. This value is returned in the view attribute of the event.
data [in]

Type: String

The composition data. This value is returned in the data attribute of the event.

locale [in]

Type: String

The locale name. This value is returned in the 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

See also

CompositionEvent

 

 

Show:
© 2017 Microsoft