Note: There are a few cases of duplicates in user autocompletion which are being worked on.

SVGRoot.createSVGRect != document.createElementNS('http://www.w3.org/2000/svg', 'rect')

RESOLVED INVALID

Status

()

Core
SVG
RESOLVED INVALID
15 years ago
13 years ago

People

(Reporter: jwatt, Assigned: Alex Fritze)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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

15 years ago
Created attachment 95724 [details]
Demonstration
(Assignee)

Comment 2

15 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
Last Resolved: 15 years ago
Resolution: --- → INVALID
(Reporter)

Comment 3

15 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.