content-visibility-resize-observer-no-error.html (816B)
1 <!doctype html> 2 <meta charset="utf8"> 3 <title>Content Visibility: resize observer interaction</title> 4 <link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> 5 <link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> 6 <link rel="match" href="content-visibility-resize-observer-no-error-ref.html"> 7 <meta name="assert" content="the test doesn't cause resize observer to produce an error"> 8 9 <script> 10 addEventListener('error', () => { 11 document.documentElement.style.background = "red"; 12 }); 13 </script> 14 15 <style> 16 div { 17 contain-intrinsic-size: auto 200px; 18 content-visibility: auto; 19 min-height: 50px; 20 background: blue; 21 } 22 </style> 23 24 <span>There should be no red color on this page.</span> 25 <span><div></div></span> 26 <div></div> 27 28 <script> 29 new ResizeObserver(() => {}); 30 </script>