NavBar.onbeforeopen event

[NavBar is no longer available for use as of Windows Library for JavaScript (WinJS) 4.2. Instead, use SplitViewCommand. ]

Occurs immediately before the NavBar is opened.

Syntax

<div 
    data-win-control="WinJS.UI.NavBar" 
    data-win-options="{onbeforeopen : handler}">
</div>
function handler(eventInfo) { /* Your code */ }
 
// addEventListener syntax
navBar.addEventListener("beforeopen", handler);
navBar.removeEventListener("beforeopen", handler);
 
- or -

navBar.onbeforeopen = handler;

Event information

Synchronous No
Bubbles Yes
Cancelable Yes

 

Event handler parameters

  • eventInfo
    Type: Event**

    An object that contains information about the event.

Remarks

This replaces the onbeforeshow event, which has been removed.

Requirements

Minimum WinJS version

WinJS 4.0

Namespace

WinJS.UI

See also

NavBar