tor-browser

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

cssstyledeclaration-csstext-final-delimiter.html (1130B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <title>CSSOM - CSSStyleDeclaration - Text - Serialization - Delimiters</title>
      5    <link rel="author" title="Glenn Adams" href="mailto:glenn@skynav.com"/>
      6    <link rel="help" href="https://drafts.csswg.org/cssom/#the-cssstyledeclaration-interface"/>
      7    <meta name="flags" content="dom"/>
      8    <script src="/resources/testharness.js"></script>
      9    <script src="/resources/testharnessreport.js"></script>
     10  </head>
     11  <body>
     12    <div id="box"></div>
     13    <script>
     14      var style = document.getElementById('box').style;
     15 
     16      test(function(){
     17        style.cssText = "";
     18        assert_equals(style.cssText, "");
     19      }, 'inline style - text - delimiters - zero declarations');
     20 
     21      test(function(){
     22        style.cssText = "left: 10px";
     23        assert_equals(style.cssText, "left: 10px;");
     24      }, 'inline style - text - delimiters - one declaration');
     25 
     26      test(function(){
     27        style.cssText = "left: 10px; right: 20px";
     28        assert_equals(style.cssText, "left: 10px; right: 20px;");
     29      }, 'inline style - text - delimiters - two declarations');
     30    </script>
     31  </body>
     32 </html>