Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="test" style="word-wrap: break-word; overflow-wrap: break-word;"></div>
<script>
test(function() {
const div = document.getElementById("test");
assert_equals(div.style.cssText, "overflow-wrap: break-word;", "Only overflow-wrap should appear when serializing the declaration.");
assert_equals(div.style.wordWrap, "break-word");
assert_equals(div.style.overflowWrap, "break-word");
assert_equals(getComputedStyle(div).wordWrap, "break-word");
assert_equals(getComputedStyle(div).overflowWrap, "break-word");
}, "word-wrap should be defined as an alias of overflow-wrap");
</script>