UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:39.0) Gecko/20100101 Firefox/39.0
Example URL:
data:text/html,<svg></svg><script>alert(document.querySelector("svg").offsetWidth)</script>
Steps to reproduce the problem:
1. Try to get offsetWidth/offsetHeight on a non-HTML element
What is the expected behavior?
Returns undefined, since per http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface these properties only exist for HTML elements.
What went wrong?
SVG elements have an offsetWidth and offsetHeight. There is no specification for how these should behave, since http://dev.w3.org/csswg/cssom-view/#dom-htmlelement-offsetwidth and http://dev.w3.org/csswg/cssom-view/#dom-htmlelement-offsetheight both assume the CSS box model, which SVG does not have.
Does it occur on multiple sites: Yes
Is it a problem with a plugin? No
Did this work before? N/A
Does this work in other browsers? Yes
Chrome version: 42.0.2311.11 (Official Build) dev (64-bit) Channel: n/a
OS Version: OS X 10.9
Flash Version: Shockwave Flash 16.0 r0
Please either remove this non-standard extension or propose an actual specification for it.
Labels: -Cr-Content Cr-Blink-DOM Cr-Blink-SVG