Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/rendering/replaced-elements/images/img-represents-nothing-style-mutation.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title><img> representing nothing and image related style mutation</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<img>
<script>
test(t => {
const img = document.querySelector('img');
const boundsBefore = img.getBoundingClientRect();
assert_equals(boundsBefore.width, 0);
assert_equals(boundsBefore.height, 0);
img.style.imageOrientation = 'none';
const boundsAfter = img.getBoundingClientRect();
assert_equals(boundsAfter.width, 0);
assert_equals(boundsAfter.height, 0);
});
</script>