Cedric Reichenbach
Cedric Reichenbach

Reputation: 9319

WinJS.Application.onsetting never fires

For my Windows 8 Store JS app, I'd like to add a privacy statement button to the settings charm. However, registering the following callback function does nothing:

WinJS.Application.onsettings = function (e) {
    var vector = e.detail.e.request.applicationCommands;
    var cmd1 = new Windows.UI.ApplicationSettings.SettingsCommand("privacy", "Privacy Statement", function () {
        window.open('http://lolkitten.org/app-privacy-policy');
    });
    vector.append(cmd1);
};

This snippet is executed on the jQuery $(document).ready event. My HTML file contains the following W8-specific JS

<script src="//Microsoft.WinJS.1.0/js/base.js"></script>
<script src="//Microsoft.WinJS.1.0/js/ui.js"></script>

My settings charm is unchanged, and no error occurs when opening it. Also, setting a debug point inside the callback function never leads to a stop, so I guess the callback never fires.

Upvotes: 0

Views: 105

Answers (1)

abmussani
abmussani

Reputation: 451

I am a windows 8 (xaml/C#) developer. Have you seen this url?.

Upvotes: 1

Related Questions