Opened 14 years ago
Closed 14 years ago
#3929 closed defect (fixed)
setClass fails on SVG documents
Reported by: | guest | Owned by: | sjmiles |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | HTML | Version: | 0.4 |
Keywords: | setClass svg gfx | Cc: | |
Blocked By: | Blocking: |
Description
This is related to ticket #3878, and could be seen as an extension. But, different failure, different bug. dojo.html.setClass almost works on an SVG document node. It fails when it tries to assign the node className directly from a string after calling node.setAttribute ("class", classStr);
There is probably some platform where the assignment is necessary. I've attached a patch that leaves the assignment, but fixes the exception on SVG document nodes.
Attachments (1)
Change History (4)
Changed 14 years ago by
Attachment: | style.patch added |
---|
comment:1 Changed 14 years ago by
Version: | 0.9 → 0.4 |
---|
comment:2 Changed 14 years ago by
comment:3 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Yep, good catch on the version change.
I discovered the fix for this in 0.9 in dojox/gfx/_base.js, _hasClass, _addClass, etc... They've been suggested as improvements for inclusion in dojo mainline.