Use a Temporary iterator in Node::collect_text_contents()

This commit is contained in:
Anthony Ramine 2015-04-07 20:27:30 +02:00
parent e57630711f
commit cdb3efec87
2 changed files with 6 additions and 5 deletions

View file

@ -524,8 +524,7 @@ impl<'a> HTMLScriptElementMethods for JSRef<'a, HTMLScriptElement> {
// http://www.whatwg.org/html/#dom-script-text
fn Text(self) -> DOMString {
let node: JSRef<Node> = NodeCast::from_ref(self);
Node::collect_text_contents(node.children().map(|c| c.root()).map(|c| c.get_unsound_ref_forever()))
Node::collect_text_contents(NodeCast::from_ref(self).children())
}
// http://www.whatwg.org/html/#dom-script-text