diff options
Diffstat (limited to 'components/script/dom/domexception.rs')
-rw-r--r-- | components/script/dom/domexception.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/domexception.rs b/components/script/dom/domexception.rs index 6bf97a457fc..fdc4257a40d 100644 --- a/components/script/dom/domexception.rs +++ b/components/script/dom/domexception.rs @@ -59,9 +59,9 @@ impl DOMException { } } -impl<'a> DOMExceptionMethods for &'a DOMException { +impl DOMExceptionMethods for DOMException { // https://heycam.github.io/webidl/#dfn-DOMException - fn Code(self) -> u16 { + fn Code(&self) -> u16 { match self.code { // https://heycam.github.io/webidl/#dfn-throw DOMErrorName::EncodingError => 0, @@ -70,12 +70,12 @@ impl<'a> DOMExceptionMethods for &'a DOMException { } // https://heycam.github.io/webidl/#idl-DOMException-error-names - fn Name(self) -> DOMString { + fn Name(&self) -> DOMString { format!("{:?}", self.code) } // https://heycam.github.io/webidl/#error-names - fn Message(self) -> DOMString { + fn Message(&self) -> DOMString { let message = match self.code { DOMErrorName::IndexSizeError => "The index is not in the allowed range.", DOMErrorName::HierarchyRequestError => "The operation would yield an incorrect node tree.", |