Closed
Bug 163268
Opened 23 years ago
Closed 23 years ago
SVGRoot.createSVGRect != document.createElementNS('http://www.w3.org/2000/svg ', 'rect')
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: jwatt, Assigned: alex)
Details
Attachments
(1 file)
|
878 bytes,
text/xml
|
Details |
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.
| Reporter | ||
Comment 1•23 years ago
|
||
| Assignee | ||
Comment 2•23 years ago
|
||
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
Closed: 23 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 3•23 years ago
|
||
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.
Description
•