link-root-1.xhtml (550B)
1 <?xml version="1.0"?> 2 <!DOCTYPE html> 3 <a xmlns="http://www.w3.org/1999/xhtml" 4 href="http://www.example-notvisited.tld" class="reftest-wait"> 5 <style> 6 <![CDATA[ 7 8 a { display: block; width: 100%; height: 100% } 9 10 :link { background: red } 11 :visited { background: green } 12 13 ]]> 14 </style> 15 <script> 16 <![CDATA[ 17 18 var a = document.documentElement; 19 getComputedStyle(a, "").backgroundColor; // flush style 20 a.href = "visited-page.html"; 21 getComputedStyle(a, "").backgroundColor; // flush style 22 document.documentElement.removeAttribute("class"); 23 24 ]]> 25 </script> 26 </a>