docshell/test/navigation/navigate.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <html>
     2 <head>
     3     <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
     4     <script src="NavigationUtils.js"></script>
     5     <script>
     6     function navigate() {
     7         var arguments = window.location.hash.substring(1).split(",");
     8         var target = arguments[0];
     9         var mechanism = arguments[1];
    11         switch(mechanism) {
    12         case "location":
    13           navigateByLocation(eval(target));
    14           break;
    15         case "open":
    16           navigateByOpen(target);
    17           break;
    18         case "form":
    19           navigateByForm(target);
    20           break;
    21         case "hyperlink":
    22           navigateByHyperlink(target);
    23           break;
    24         }
    25     }
    26     </script>
    27 </head>
    28 <body onload="navigate();">
    29 <script>
    30 var arguments = window.location.hash.substring(1).split(",");
    31 var target = arguments[0];
    32 var mechanism = arguments[1];
    33 document.write("target=" + target + " mechanism=" + mechanism);
    34 </script>
    35 </body>
    36 </html>

mercurial