22 lines
658 B
HTML
22 lines
658 B
HTML
<!DOCTYPE HTML>
|
|
<html class="reftest-wait">
|
|
<script src="svg-image-util.js"></script>
|
|
<style>
|
|
canvas {
|
|
background: blue;
|
|
}
|
|
</style>
|
|
<body>
|
|
<script>
|
|
let viewBoxes = [null, "0 0 50 50", "0 0 50 20"];
|
|
let promises = [];
|
|
for (viewBox of viewBoxes) {
|
|
// Without a given height the viewBox should be used to determine an aspect
|
|
// ratio and that applied to the width gives the height.
|
|
promises.push(generateCanvasDrawImageSVG("350", "200", "200px", null, viewBox));
|
|
}
|
|
Promise.all(promises).then(() => { document.documentElement.className = "" });
|
|
</script>
|
|
<!-- Body gets populated by script -->
|
|
</body>
|
|
</html>
|