top-layer-nested-crash.html (1821B)
1 <!DOCTYPE html> 2 <iframe width="800" srcdoc='<!DOCTYPE html> 3 <style> 4 .wrapper { 5 container: example / inline-size; 6 position: fixed; 7 width: 100%; 8 } 9 .inner { 10 display: none; 11 } 12 @container (min-width: 600px) { 13 .inner { 14 display: block; 15 } 16 } 17 </style> 18 <body style="width: 600px;"> 19 <div class="wrapper"> 20 <div class="inner"> 21 <dialog> 22 <div class="wrapper"> 23 <div class="inner"> 24 <dialog></dialog> 25 </div> 26 </div> 27 </dialog> 28 </div> 29 </div> 30 </body> 31 <script> 32 const dialogs = document.querySelectorAll("dialog"); 33 for (let dialog of dialogs) { 34 dialog.showModal(); 35 } 36 </script>'> 37 </iframe> 38 <script> 39 window.onload = () => { 40 const iframe = document.querySelector('iframe'); 41 iframe.width = 400; 42 iframe.contentDocument.body.offsetTop; 43 iframe.width = 800; 44 }; 45 </script>