initFocusEvent method

[This documentation is preliminary and is subject to change.]

Initializes a new focus event that the createEvent method created.

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

Syntax

HRESULT retVal = object.initFocusEvent(eventType, canBubble, cancelable, viewArg, detailArg);

Standards information

Parameters

eventType [in]

Type: BSTR

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

blur

This event is an onblur event.

focus

This event is an onfocus event.

focusin

This event is an onfocusin event.

focusout

This event is an onfocusout event.

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 view property of the event.

detailArg [in]

Type: long

A long value that specifies additional information. This value is returned in the detail property of the event.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

See also

initUIEvent

 

 

Build date: 1/23/2012