blob: 7a565f2c2562a12eda2382f178feeb3dc616d153 [file] [log] [blame]
<!DOCTYPE html>
<head>
<style>
iframe {
width: 400px;
height: 300px;
}
</style>
<script>
addEventListener('load', function() {
// Since the picture <source> in the iframe is set to 50vw, resizing the
// iframe should cause the image to resize with it.
var iframe = document.getElementById('iframe');
iframe.style.width = "200px";
});
</script>
</head>
<body>
<iframe id="iframe" src="resources/viewport-resize-after-load-iframe.html">
</body>