webapprt/test/chrome/sample.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <!DOCTYPE HTML>
     3 <!--
     4   This is the webapp.  It doesn't need to do anything in particular, just
     5   whatever you want to test from your browser_ test file.
     6 -->
     8 <html>
     9   <head>
    10     <meta charset="utf-8">
    11     <script>
    13 function onLoad() {
    14   var msg = document.getElementById("msg");
    15   var self = navigator.mozApps.getSelf();
    16   self.onsuccess = function () {
    17     msg.textContent = "Webapp getSelf OK: " + self.result;
    18   };
    19   self.onerror = function () {
    20     msg.textContent = "Webapp getSelf failed: " + self.error.name;
    21   };
    22 }
    24     </script>
    25   </head>
    26   <body onload="onLoad();" onunload="">
    27     <p>This is the test webapp.</p>
    28     <p id="msg">Webapp waiting for page load...</p>
    29   </body>
    30 </html>

mercurial