blob: 31a5ff4661c6ac70084d3fea43c8d0caa91e7928 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<html>
<style>
div {
color: red;
}
div::selection {
background-color: lime;
}
</style>
<div id="foo">Hello world</div>
<script>
document.write('<p>The number of matched rules is: ' +
document.defaultView.getMatchedCSSRules(document.getElementById('foo'), '').length);
</script>
|