initTextEvent method

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

 

Syntax

HRESULT retVal = object.initTextEvent(eventType, canBubble, cancelable, viewArg, dataArg, inputMethod, locale);

Parameters

eventType [in]

Type: BSTR

One of the following values, or a user-defined custom event type.

textInput

Characters have been entered.

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

An IHTMLWindow2 variable that specifies the active window, or NULL. This value is returned in the IDOMUIEvent::view property of the event.

dataArg [in]

Type: BSTR

Character data. This value is returned in the IDOMTextEvent::data property of the event.

inputMethod [in]

Type: unsigned long

The input mode for the text. For more information, see IDOMTextEvent::inputMethod.

locale [in]

Type: BSTR

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