blob: d29ef06ab680f0839e11e12b7c9dfcf34dfa0099 [file] [log] [blame]
<html>
<head>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
<style>
div { background: purple; margin: 1em; color: white; font: 24px 'Lucida Grande'; }
</style>
</head>
<body>
Note that background is buggy right now!
<div id="foo">Test</div>
<script>
var ruleList = document.defaultView.getMatchedCSSRules(document.getElementById('foo'), '');
var decl = ruleList[0].style;
for (var i = 0; i < decl.length; i++) {
var shorthand = decl.getPropertyShorthand(decl[i]);
document.write(decl[i] + ": " + decl.getPropertyValue(decl[i]));
if (shorthand) {
document.write(" (original property was " + shorthand
+ (decl.isPropertyImplicit(decl[i]) ? " and property was implicitly set.)" : ")"));
}
document.write( "<br>");
}
</script>
</body>
</html>