cssom
Version:
CSS Object Model implementation and CSS parser
17 lines (16 loc) • 369 B
HTML
<style>
@media handheld, only screen and (max-device-width: 480px){
html {
color: black;
}
}
</style>
<script>
window.onload = function(){
if (document.styleSheets[0].cssRules[0].cssRules[0].parentRule === document.styleSheets[0].cssRules[0]) {
document.body.innerHTML = "PASS parentRule";
} else {
document.body.innerHTML = "FAIL parentRule";
}
}
</script>