img-represents-nothing-style-mutation.html (698B)
1 <!doctype html> 2 <title><img> representing nothing and image related style mutation</title> 3 <link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#images-3"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <img> 7 <script> 8 test(t => { 9 const img = document.querySelector('img'); 10 const boundsBefore = img.getBoundingClientRect(); 11 assert_equals(boundsBefore.width, 0); 12 assert_equals(boundsBefore.height, 0); 13 14 img.style.imageOrientation = 'none'; 15 16 const boundsAfter = img.getBoundingClientRect(); 17 assert_equals(boundsAfter.width, 0); 18 assert_equals(boundsAfter.height, 0); 19 }); 20 </script>