viewBox-baseVal-change-invalid.html (531B)
1 <!doctype HTML> 2 <title>viewBox.baseVal dynamically changes to invalid value</title> 3 <link rel="help" href="https://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute"> 4 <link rel="match" href="../struct/reftests/reference/green-100x100.html"> 5 <svg id="svg" style="height: 200px; width: 200px;" viewBox="0 0 100 100"> 6 <rect width="100" height="100" fill="green"></rect> 7 </svg> 8 <script> 9 onload = () => { 10 // After this, viewBox should be ignored, and the green rect should be 100x100. 11 svg.viewBox.baseVal.width = -100; 12 }; 13 </script>