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)
Core
SVG
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>
| Reporter | ||
Comment 1•11 years ago
|
||
| Reporter | ||
Comment 2•11 years ago
|
||
| Reporter | ||
Updated•11 years ago
|
Component: HTML: Parser → SVG
Whiteboard: [parity-chrome]
Comment 3•7 years ago
|
||
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]
Comment 4•4 years ago
|
||
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.
Description
•