aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/textdecoder.rs
diff options
context:
space:
mode:
authorBogdan Cuza <bogdan.cuza@hotmail.com>2015-07-21 18:53:01 +0300
committerBogdan <boghison22@gmail.com>2015-07-28 13:28:41 +0200
commit233a769c67738942a0ac47c15465e36891883c3b (patch)
treef271b64c29addb4826feb098a03a0c6ce07eb4b3 /components/script/dom/textdecoder.rs
parentf039827dcd618d1731f9cc0d91202690c28f10d1 (diff)
downloadservo-233a769c67738942a0ac47c15465e36891883c3b.tar.gz
servo-233a769c67738942a0ac47c15465e36891883c3b.zip
Add spec links
Diffstat (limited to 'components/script/dom/textdecoder.rs')
-rw-r--r--components/script/dom/textdecoder.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script/dom/textdecoder.rs b/components/script/dom/textdecoder.rs
index 308ca30527c..4b8756afba7 100644
--- a/components/script/dom/textdecoder.rs
+++ b/components/script/dom/textdecoder.rs
@@ -73,15 +73,18 @@ impl TextDecoder {
impl<'a> TextDecoderMethods for &'a TextDecoder {
+ // https://encoding.spec.whatwg.org/#dom-textdecoder-encoding
fn Encoding(self) -> DOMString {
self.encoding.whatwg_name().unwrap().to_owned()
}
+ // https://encoding.spec.whatwg.org/#dom-textdecoder-fatal
fn Fatal(self) -> bool {
self.fatal
}
#[allow(unsafe_code)]
+ // https://encoding.spec.whatwg.org/#dom-textdecoder-decode
fn Decode(self, _cx: *mut JSContext, input: Option<*mut JSObject>)
-> Fallible<USVString> {
let input = match input {
@@ -108,5 +111,4 @@ impl<'a> TextDecoderMethods for &'a TextDecoder {
Err(_) => Err(Error::Type("Decoding failed".to_owned())),
}
}
-
}