dialog-closewatcher-crash.html (458B)
1 <!DOCTYPE html> 2 3 <!-- This test passes if it does not crash. --> 4 5 <dl> 6 <dt contenteditable></dt> 7 <dialog open></dialog> 8 </dl> 9 10 <script> 11 const dialog = document.querySelector('dialog'); 12 dialog.open = false; 13 document.querySelector('dl').addEventListener("focusin", () => { 14 dialog.showModal(); 15 }); 16 document.defaultView.requestIdleCallback(() => { 17 window.getSelection().addRange(document.createRange()); 18 dialog.close(); 19 }); 20 </script>