mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Fix HTMLTemplateElement.innerHTML
https://github.com/w3c/DOM-Parsing/issues/1
This commit is contained in:
parent
a5cefe41d0
commit
b3820047da
4 changed files with 23 additions and 28 deletions
|
@ -203,7 +203,14 @@ impl<'a> Serializable for &'a Node {
|
|||
try!(serializer.start_elem(name.clone(), attr_refs));
|
||||
}
|
||||
|
||||
for handle in node.children() {
|
||||
let children = if let Some(tpl) = HTMLTemplateElementCast::to_ref(node) {
|
||||
// https://github.com/w3c/DOM-Parsing/issues/1
|
||||
NodeCast::from_ref(&*tpl.Content()).children()
|
||||
} else {
|
||||
node.children()
|
||||
};
|
||||
|
||||
for handle in children {
|
||||
try!(handle.r().serialize(serializer, IncludeNode));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue