replace Fallible<()> with ErrorResult

This commit is contained in:
Di Xu 2016-04-13 19:53:57 +08:00
parent 9b57d8d686
commit 76f57efb58
4 changed files with 20 additions and 20 deletions

View file

@ -1489,7 +1489,7 @@ impl ElementMethods for Element {
}
/// https://w3c.github.io/DOM-Parsing/#widl-Element-innerHTML
fn SetInnerHTML(&self, value: DOMString) -> Fallible<()> {
fn SetInnerHTML(&self, value: DOMString) -> ErrorResult {
let context_node = self.upcast::<Node>();
// Step 1.
let frag = try!(context_node.parse_fragment(value));
@ -1510,7 +1510,7 @@ impl ElementMethods for Element {
}
// https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#widl-Element-outerHTML
fn SetOuterHTML(&self, value: DOMString) -> Fallible<()> {
fn SetOuterHTML(&self, value: DOMString) -> ErrorResult {
let context_document = document_from_node(self);
let context_node = self.upcast::<Node>();
// Step 1.