If an element is created using say: SVGRoot.createSVGRect(); then the setAttribute method does not exist for it. You have to use: document.createElementNS('http://www.w3.org/2000/svg', 'rect'); It is clear that there is different code for both methods. Would it perhaps be more efficient to get the createSVGRect method etc to use the createElementNS method code in some way? That would kill this bug at the same time. Of course I could be talking rubbish as I don't know the implementation details.
svg::createSVGRect creates an instance of SVGRect (http://www.croczilla.com/~alex/reference/SVG/specs1_0/types.html#InterfaceSVGRe ct). document::createElementNS("...", "rect") creates an instance of SVGRectElement (http://www.croczilla.com/~alex/reference/SVG/specs1_0/shapes.html#InterfaceSVGR ectElement). The two are different things. SVGRect doesn't contain a setAttribute method.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → INVALID
Oops, I used to know that. Stupid mistake! Sorry about that.
You need to log in before you can comment on or make changes to this bug.