mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Rewrite NodeChildrenIterator to return Temporary.
This commit is contained in:
parent
bc8ed81dc1
commit
c8106da277
11 changed files with 208 additions and 129 deletions
|
@ -48,7 +48,8 @@ impl<'a> HTMLTitleElementMethods for JSRef<'a, HTMLTitleElement> {
|
|||
let node: JSRef<Node> = NodeCast::from_ref(self);
|
||||
let mut content = String::new();
|
||||
for child in node.children() {
|
||||
let text: Option<JSRef<Text>> = TextCast::to_ref(child);
|
||||
let child = child.root();
|
||||
let text: Option<JSRef<Text>> = TextCast::to_ref(child.r());
|
||||
match text {
|
||||
Some(text) => content.push_str(text.characterdata().data().as_slice()),
|
||||
None => (),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue