tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

file_DOM_element_instanceof.xhtml (1245B)


      1 <?xml version="1.0"?>
      2 <?xml-stylesheet type="text/css" href="chrome://global/skin"?>
      3 <window title="Mozilla Bug 824917"
      4        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
      5 
      6  <iframe type="content"></iframe>
      7 
      8  <script type="application/javascript">
      9  <![CDATA[
     10  /** Test for Bug 799299 */
     11  var SimpleTest = window.arguments[0].SimpleTest;
     12  var ok = window.arguments[0].ok;
     13 
     14  // Note: We can't use frames[0] here because the type="content" attribute
     15  // isolates it into a separate browsing context hierarchy.
     16  var doc = document.querySelector("iframe").contentDocument;
     17  ok(HTMLBodyElement.isInstance(doc.createElement("body")),
     18     "Should be instance of HTMLBodyElement");
     19  ok(HTMLDivElement.isInstance(doc.createElement("div")),
     20     "Should be instance of HTMLDivElement");
     21  ok(HTMLFrameSetElement.isInstance(doc.createElement("frameset")),
     22     "Should be instance of HTMLFrameSetElement");
     23  ok(HTMLHeadingElement.isInstance(doc.createElement("h1")),
     24     "Should be instance of HTMLHeadingElement");
     25  ok(HTMLLabelElement.isInstance(doc.createElement("label")),
     26     "Should be instance of HTMLLabelElement");
     27 
     28  window.close();
     29  window.arguments[0].SimpleTest.finish();
     30  ]]>
     31  </script>
     32 </window>