Bug 74959
Summary: | classList property undefined for SVG elements | ||
---|---|---|---|
Product: | WebKit | Reporter: | James Robinson <jamesr> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | arv, eric, kling, thorton, zimmermann |
Priority: | P2 | Keywords: | EasyFix |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
James Robinson
Testcase:
<!DOCTYPE html>
<svg class="foo bar"></svg>
<script>
w(document.querySelector('svg').classList.length);
</script>
produces "2" in Firefox and "Uncaught TypeError: Cannot read property 'length' of undefined on line 2" in WebKit because the .classList property on the <svg> element is undefined.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Erik Arvidsson
We should allow classList on any element that has className.
ie HTMLElement and SVGStylableElement
http://www.google.com/codesearch#search/&exact_package=chromium&q=className%20file:%5C.idl%20file:WebCore%20case:yes&type=cs
This means that we need to update SVGStylableElement.idl and add tests.
Andreas Kling
*** This bug has been marked as a duplicate of bug 66284 ***