diff options
Diffstat (limited to 'components/script/parse/html.rs')
-rw-r--r-- | components/script/parse/html.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/components/script/parse/html.rs b/components/script/parse/html.rs index 3fc60d8c7c8..82d021298ac 100644 --- a/components/script/parse/html.rs +++ b/components/script/parse/html.rs @@ -201,7 +201,8 @@ impl<'a> Serializable for JSRef<'a, Node> { } for handle in node.children() { - try!(handle.serialize(serializer, IncludeNode)); + let handle = handle.root(); + try!(handle.r().serialize(serializer, IncludeNode)); } if traversal_scope == IncludeNode { @@ -212,7 +213,8 @@ impl<'a> Serializable for JSRef<'a, Node> { (ChildrenOnly, NodeTypeId::Document) => { for handle in node.children() { - try!(handle.serialize(serializer, IncludeNode)); + let handle = handle.root(); + try!(handle.r().serialize(serializer, IncludeNode)); } Ok(()) }, |