focuschanged event
Collapse the table of content
Expand the table of content

WinJS.UI.XYFocus.focuschanged event

Applies to Windows and Windows Phone

Raised when XYFocus has successfully changed focus. The HTMLElement.focus method does not trigger this event.

Syntax


function handler(eventInfo) { /* Your code */ }
 
// addEventListener syntax
WinJS.UI.XYFocus.addEventListener("focuschanged", handler);
WinJS.UI.XYFocus.removeEventListener("focuschanged", handler);


Event information

SynchronousNo
BubblesYes
CancelableYes

 

Event handler parameters

eventInfo

Type: CustomEvent

An object that contains information about the event. The detail property of this object contains the following sub-properties:

detail.previousFocusElement

Type: HTMLElement

The element that previously had focus.

detail.keyCode

Type: Number

The key code that triggered the focus change.

Remarks

After the moveFocus() function has been called, the focuschanging event fires. Once the new element has focus, the focuschanged event fires.

Requirements

Minimum WinJS version

WinJS 3.0

Namespace

WinJS.UI.XYFocus

See also

WinJS.UI.XYFocus

 

 

Show:
© 2017 Microsoft