Export (0) Print
Expand All

initFocusEvent method

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

var retval = FocusEvent.initFocusEvent(eventType, canBubble, cancelable, viewArg, detailArg, relatedTargetArg );

Parameters

eventType [in]

Type: String

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: 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 property of the event.
detailArg [in]

Type: Integer

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

relatedTargetArg

Type: IEventTarget

The object used for the relatedTarget attribute of the new focus event.

Return value

Type: HRESULT

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

Standards information

See also

FocusEvent
initUIEvent

 

 

Show:
© 2014 Microsoft