mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update the spec links in domexception.rs (fixes #5528)
This commit is contained in:
parent
b63fb0c0a7
commit
c37a34234a
1 changed files with 4 additions and 4 deletions
|
@ -59,21 +59,21 @@ impl DOMException {
|
|||
}
|
||||
|
||||
impl<'a> DOMExceptionMethods for JSRef<'a, DOMException> {
|
||||
// http://dom.spec.whatwg.org/#dom-domexception-code
|
||||
// http://heycam.github.io/webidl/#dfn-DOMException
|
||||
fn Code(self) -> u16 {
|
||||
match self.code {
|
||||
// http://dom.spec.whatwg.org/#concept-throw
|
||||
// http://heycam.github.io/webidl/#dfn-throw
|
||||
DOMErrorName::EncodingError => 0,
|
||||
code => code as u16
|
||||
}
|
||||
}
|
||||
|
||||
// http://dom.spec.whatwg.org/#error-names-0
|
||||
// http://heycam.github.io/webidl/#idl-DOMException-error-names
|
||||
fn Name(self) -> DOMString {
|
||||
format!("{:?}", self.code)
|
||||
}
|
||||
|
||||
// http://dom.spec.whatwg.org/#error-names-0
|
||||
// http://heycam.github.io/webidl/#error-names
|
||||
fn Message(self) -> DOMString {
|
||||
let message = match self.code {
|
||||
DOMErrorName::IndexSizeError => "The index is not in the allowed range.",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue