Cordova FxOS issue

by Piotr Zalewa

HTML

<h1>Sample WebApp</h1>

<section id="uninstalled">
    <button id='install'>INSTALL</button>
    <p>This app will try to alert twice.</p>
</section>
<section id="installed">
    <p><i>pre</i> and <i>post</i> should be alerted
</section>

JavaScript

if (install.state == 'uninstalled') {
    // hide the installed section
    document.querySelector('#installed').style.display = 'none';
    var installButton = document.querySelector("#install");
    installButton.onclick = function () {
        install("http://jsfiddle.net/zalun/VkCyH/manifest.webapp");
    };
} else if (install.state == 'installed') {
    // hide the uninstalled section
    document.querySelector('#uninstalled').style.display = 'none';
    // alert 'pre' and 'post'
    alert('pre'); 
    for (var key in window.navigator) {window.navigator[key]};
    alert('post');
}