Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-grid/img-src-changes.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="Grid goes through layout when image src changes">
<style>
div {
display: grid;
}
img {
width: 100px;
height: 100%;
}
</style>
<body>
<p>Test passes if there is a filled green square.</p>
<div>
<img src="">
</div>
</body>
<script>
document.body.offsetHeight;
document.querySelector("img").src = "grid-items/support/100x100-green.png";
</script>
</html>