Return None as style for elements not in a document

This commit is contained in:
David Zbarsky 2015-07-30 12:36:08 -04:00
parent acbca7b3aa
commit 36145d0686
2 changed files with 11 additions and 0 deletions

View file

@ -40,6 +40,12 @@
assert_equals(getComputedStyle(div, '::after').getPropertyValue("color"), "");
}, "Missing :after pseudoelement");
test(function() {
var div = document.createElement("div");
div.id = "foo";
assert_equals(getComputedStyle(div).getPropertyValue("width"), "");
}, "Blank style for elements not in a document");
</script>
</body>
</html>