Closed Bug 571390 Opened 10 years ago Closed 10 years ago
List is always empty on xul elements
Steps to reproduce 1/ Create some xul containing various elements with classes. 2/ Add some JS that uses classList property and associated methods to manipulate the elements' classes. Expected result 1/ classList contains DOMTokenList of classes and associated methods can be used to manipulate the list. Actual result 1/ classList is empty, so using add method overwrites anything in className property.
The problem seems to be that DOMTokenList uses GetParsedAttr, but it should probably use GetAttrInfo, which can handle XULprototypes.
Say you have an xul element which has a class bar. The DOMTokenList is empty at this point and className is "bar" If you set the element's className to "foo" then the DOMTokenList gets populated.
Right; see comment 1.
blocking2.0: --- → ?
Comment on attachment 450646 [details] [diff] [review] patch This looks ok, but we should add a comment to the GetParsedAttr footgun.
Attachment #450646 - Flags: review?(bzbarsky) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.