toolkit/mozapps/extensions/test/xpinstall/installtrigger.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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     2           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     4 <html>
     6 <!-- This page will accept some json as the uri query and pass it to InstallTrigger.install -->
     8 <head>
     9 <title>InstallTrigger tests</title>
    10 <script type="text/javascript">
    11 function installCallback(url, status) {
    12   document.getElementById("status").textContent = status;
    13 }
    15 function startInstall() {
    16   var text = decodeURIComponent(document.location.search.substring(1));
    17   var triggers = JSON.parse(text);
    18   try {
    19     document.getElementById("return").textContent = InstallTrigger.install(triggers, installCallback);
    20   }
    21   catch (e) {
    22     document.getElementById("return").textContent = "exception";
    23     throw e;
    24   }
    25 }
    26 </script>
    27 </head>
    28 <body onload="startInstall()">
    29 <p>InstallTrigger tests</p>
    30 <p id="return"></p>
    31 <p id="status"></p>
    32 </body>
    33 </html>

mercurial