docshell/test/navigation/navigate.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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