<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.styleSheets[0].rules; | |
var decl = ruleList[0].style; | |
for (var i = 0; i < decl.length; i++) { | |
document.write(decl[i] + ": " + decl.getPropertyValue(decl[i])); | |
document.write( "<br>"); | |
} | |
</script> | |
</body> | |
</html> |