mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
get rid of and_then in innerHTML setter
This commit is contained in:
parent
cc771fdd68
commit
3542360d00
1 changed files with 3 additions and 3 deletions
|
@ -1176,9 +1176,9 @@ impl<'a> ElementMethods for JSRef<'a, Element> {
|
||||||
// with the new value as markup, and the context object as the context element.
|
// with the new value as markup, and the context object as the context element.
|
||||||
// 2. Replace all with fragment within the context object.
|
// 2. Replace all with fragment within the context object.
|
||||||
let context_node: JSRef<Node> = NodeCast::from_ref(self);
|
let context_node: JSRef<Node> = NodeCast::from_ref(self);
|
||||||
context_node.parse_fragment(value)
|
let frag = try!(context_node.parse_fragment(value));
|
||||||
.and_then(|frag| Ok(Node::replace_all(Some(NodeCast::from_ref(frag.root().r())),
|
Node::replace_all(Some(NodeCast::from_ref(frag.root().r())), context_node);
|
||||||
context_node)))
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn GetOuterHTML(self) -> Fallible<DOMString> {
|
fn GetOuterHTML(self) -> Fallible<DOMString> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue