WinJS.Resources.removeEventListener function

Applies to Windows and Windows Phone

Removes an event listener that the addEventListener method registered.

Syntax


WinJS.Resources.removeEventListener(type, listener, useCapture);

Parameters

type

Type: String

The name of the event that the event listener is registered for.

listener

Type: Function

The listener (event handler function) to remove.

useCapture

Type: Boolean

Set to true to remove the capturing phase listener; set to false to remove the bubbling phase listener.

Return value

This function does not return a value.

Examples

This example is based on scenario 6 of the Application resources and localization sample. See the sample for the more complete solution.


var output;

var page = WinJS.UI.Pages.define("/html/scenario6.html", {
    ready: function (element, options) {
        output = document.getElementById('output');
        WinJS.Resources.processAll(output); // Refetch string resources
        WinJS.Resources.removeEventListener("contextchanged", refresh, false);
        WinJS.Resources.addEventListener("contextchanged", refresh, false);
    }
});

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1

Namespace

WinJS.Resources

Library

Base.js

See also

WinJS.Resources
Application resources and localization sample

 

 

Show:
© 2014 Microsoft