tor-browser

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

word-wrap-alias.html (1006B)


      1 <!DOCTYPE html>
      2 <link rel="help" href="https://drafts.csswg.org/css-text-3/#propdef-word-wrap">
      3 <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/866">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="../../support/shorthand-testcommon.js"></script>
      7 <div id="test" style="word-wrap: break-word; overflow-wrap: break-word;"></div>
      8 <script>
      9 test(function() {
     10    const div = document.getElementById("test");
     11    assert_equals(div.style.cssText, "overflow-wrap: break-word;", "Only overflow-wrap should appear when serializing the declaration.");
     12    assert_equals(div.style.wordWrap, "break-word");
     13    assert_equals(div.style.overflowWrap, "break-word");
     14    assert_equals(getComputedStyle(div).wordWrap, "break-word");
     15    assert_equals(getComputedStyle(div).overflowWrap, "break-word");
     16 }, "word-wrap should be defined as an alias of overflow-wrap");
     17 
     18 test_is_legacy_name_alias("word-wrap", "overflow-wrap");
     19 </script>