browser/base/content/test/general/file_fullscreen-window-open.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 <!DOCTYPE html>
     2 <html>
     3   <head>
     4     <title>Test for window.open() when browser is in fullscreen</title>
     5   </head>
     6   <body>
     7     <script>
     8       window.addEventListener("load", function onLoad() {
     9         window.removeEventListener("load", onLoad, true);
    11         document.getElementById("test").addEventListener("click", onClick, true);
    12       }, true);
    14       function onClick(aEvent) {
    15         aEvent.preventDefault();
    17         var dataStr = aEvent.target.getAttribute("data-test-param");
    18         var data = JSON.parse(dataStr);
    19         window.open(data.uri, data.title, data.option);
    20       }
    21     </script>
    22     <a id="test" href="" data-test-param="">Test</a>
    23   </body>
    24 </html>

mercurial