Closed Bug 1019338 Opened 11 years ago Closed 4 years ago

The template element doesn't work when embedded in standalone SVG, only compound documents

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: birtles, Unassigned)

Details

(Keywords: parity-chrome)

Attachments

(2 files)

The following fragment as a standalone SVG document produces "0": <svg xmlns="http://www.w3.org/2000/svg"> <foreignObject> <template xmlns="http://www.w3.org/1999/xhtml" id="a"> <p>body</p> </template> </foreignObject> <script> alert(document.getElementById("a").content.children.length); </script> </svg> But if I wrap it in <html> it produces "1": <html> <svg xmlns="http://www.w3.org/2000/svg"> <foreignObject> <template xmlns="http://www.w3.org/1999/xhtml" id="a"> <p>body</p> </template> </foreignObject> <script> alert(document.getElementById("a").content.children.length); </script> </svg> </html>
Attached image <template> in SVG
Component: HTML: Parser → SVG
Whiteboard: [parity-chrome]
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Keywords: parity-chrome
Whiteboard: [parity-chrome]

Seems to work now.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: