tor-browser

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

style_events.html (1024B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <meta charset="utf-8">
      5    <title>HTML Test: The style events</title>
      6    <link rel="author" title="Intel" href="http://www.intel.com/">
      7    <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-style-element">
      8    <script src="/resources/testharness.js"></script>
      9    <script src="/resources/testharnessreport.js"></script>
     10    <script>
     11      var tLoad = async_test("If the style is loaded successfully, the 'load' event must be fired");
     12      var tError = async_test("If the style is loaded unsuccessfully, the 'error' event must be fired");
     13 
     14      function onstyleload(e) {
     15        tLoad.done();
     16      }
     17 
     18      function onstyleerror(e) {
     19        tError.done();
     20      }
     21    </script>
     22    <style onload="onstyleload()">
     23      #test {
     24        height: 100px;
     25        width: 100px;
     26      }
     27    </style>
     28    <style onerror="onstyleerror()">
     29      @import url(nonexistent.css);
     30    </style>
     31  </head>
     32  <body>
     33    <div id="log"></div>
     34    <div id="test"></div>
     35  </body>
     36 </html>