Last Comment Bug 163268 - SVGRoot.createSVGRect != document.createElementNS('', 'rect')
: SVGRoot.createSVGRect != document.createElementNS('
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: x86 Windows XP
-- normal (vote)
: ---
Assigned To: Alex Fritze
: Bradley Baetz (:bbaetz)
: Jet Villegas (:jet)
Depends on:
  Show dependency treegraph
Reported: 2002-08-17 16:24 PDT by Jonathan Watt [:jwatt]
Modified: 2004-06-21 06:55 PDT (History)
0 users
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Demonstration (878 bytes, text/xml)
2002-08-17 16:32 PDT, Jonathan Watt [:jwatt]
no flags Details

Description User image Jonathan Watt [:jwatt] 2002-08-17 16:24:11 PDT
If an element is created using say: 


then the setAttribute method does not exist for it. You have to use: 

document.createElementNS('', '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.
Comment 1 User image Jonathan Watt [:jwatt] 2002-08-17 16:32:35 PDT
Created attachment 95724 [details]
Comment 2 User image Alex Fritze 2002-08-17 17:14:46 PDT
svg::createSVGRect creates an instance of SVGRect

document::createElementNS("...", "rect") creates an instance of SVGRectElement 

The two are different things. SVGRect doesn't contain a setAttribute method.
Comment 3 User image Jonathan Watt [:jwatt] 2002-08-18 11:07:45 PDT
Oops, I used to know that. Stupid mistake! Sorry about that. 

Note You need to log in before you can comment on or make changes to this bug.