1712198.html (817B)
1 <html class="reftest-wait"> 2 <script> 3 let pp; 4 window.addEventListener("MozReftestInvalidate", finish); 5 document.addEventListener('DOMContentLoaded', () => { 6 let a = document.documentElement 7 pp = SpecialPowers.wrap(self).printPreview(); 8 pp.document.adoptNode(a) 9 let b = document.createElementNS('http://www.w3.org/1999/xhtml', 'optgroup') 10 a.appendChild(b) 11 b.focus({ }) 12 }); 13 function finish() { 14 setTimeout(function () { 15 try { pp.close(); } catch (e) { } 16 document.documentElement.className = ""; 17 }, 0); 18 } 19 // we don't get a MozReftestInvalidate event because the reftest-wait class 20 // on the document element can't be seen by the reftest harness because the 21 // documentElement gets removed from the document, so we use onbeforeunload to 22 // close the window. 23 onbeforeunload = finish; 24 </script> 25 </html>