Closed Bug 576613 Opened 15 years ago Closed 15 years ago

SVG nodes added to a HTML5 document with appendChild does not render

Categories

(Core :: SVG, defect)

defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: Jeremie, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:2.0b2pre) Gecko/20100702 Minefield/4.0b2pre Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:2.0b2pre) Gecko/20100702 Minefield/4.0b2pre Using the DOM functions (createElementNS, setAttributeNS) with Javascript to build some SVG node work well. But when you append those nodes to an HTML5 Dom tree, they are well attached but the SVG is not rendered. Reproducible: Always Steps to Reproduce: 1. Look at the attach test case Actual Results: The DOM contain 2 SVG elements but only one circle is visible. Expected Results: You should see 2 circles
Attached file Testcase
This test case should show two circles.
Your code is broken. You should be setting attributes in the null namespace, not the SVG namespace. To get attributes in a non-null namespace using markup, you'd have to prefix them (like xlink:* and xmlns:* and so forth), and if you note how SVG markup actually works, that's not done. I suggest examining the SVG DOM created by the parser for parsed SVG in a reasonable DOM inspection tool to see what the namespaces look like...
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
Arf ! Ok, my apologize. Sorry for the inconvenient.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: