RetroZilla/extensions/xmlterm/ui/content/styletest.html

22 lines
578 B
HTML
Raw Normal View History

2015-10-21 05:03:22 +02:00
<!-- xpctest.html: Tests DOM access to style sheets -->
<html><head>
<style type="text/css">
SPAN.test { color: green }
</style>
<script language="JavaScript">
function onLoad()
{
var sheet = window.document.styleSheets[0];
dump("sheet = "+sheet+"\n");
var rule = sheet.cssRules[0];
dump("rule = "+rule+"\n");
var selectorText = rule.selectorText;
dump("selectorText = '"+selectorText+"' (correct value is 'SPAN.test')\n");
}
</script>
</head><body onload="return onLoad();">
<SPAN class="test">STYLE TEST<SPAN>
</body></html>