mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-10 01:40:17 +01:00
22 lines
578 B
HTML
22 lines
578 B
HTML
|
<!-- 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>
|