img-src-changes.html (623B)
1 <!DOCTYPE html> 2 <html> 3 <link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com"> 4 <link rel="match" href="../reference/ref-filled-green-100px-square-only.html"> 5 <link rel="help" href="https://drafts.csswg.org/css-grid/"> 6 <meta name="assert" content="Grid goes through layout when image src changes"> 7 <style> 8 div { 9 display: grid; 10 } 11 img { 12 width: 100px; 13 height: 100%; 14 } 15 </style> 16 <body> 17 <p>Test passes if there is a filled green square.</p> 18 <div> 19 <img src=""> 20 </div> 21 </body> 22 <script> 23 document.body.offsetHeight; 24 document.querySelector("img").src = "grid-items/support/100x100-green.png"; 25 </script> 26 </html>