aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/headers.rs
diff options
context:
space:
mode:
authorMalisa Smith <malisa.tsmith@gmail.com>2016-07-20 08:57:17 -0700
committerMalisa Smith <malisa.tsmith@gmail.com>2016-07-20 11:41:35 -0700
commit272d12da26f150f9fd6447572dc10464340f3da4 (patch)
treef01d16797564d75a91d4b073f3b3e1e17106c281 /components/script/dom/headers.rs
parentcec3697cb2757aec92c78166f14208cee0d7e544 (diff)
downloadservo-272d12da26f150f9fd6447572dc10464340f3da4.tar.gz
servo-272d12da26f150f9fd6447572dc10464340f3da4.zip
Small changes to Headers.webidl and headers.rs
Expose the Headers interface to the Window scope and to Workers Move Append function inside HeadersMethods trait
Diffstat (limited to 'components/script/dom/headers.rs')
-rw-r--r--components/script/dom/headers.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/dom/headers.rs b/components/script/dom/headers.rs
index 182dcbf9ac2..e97edc00572 100644
--- a/components/script/dom/headers.rs
+++ b/components/script/dom/headers.rs
@@ -4,6 +4,7 @@
use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::HeadersBinding;
+use dom::bindings::codegen::Bindings::HeadersBinding::HeadersMethods;
use dom::bindings::error::Error;
use dom::bindings::global::GlobalRef;
use dom::bindings::js::Root;
@@ -42,9 +43,11 @@ impl Headers {
pub fn new(global: GlobalRef) -> Root<Headers> {
reflect_dom_object(box Headers::new_inherited(), global, HeadersBinding::Wrap)
}
+}
+impl HeadersMethods for Headers {
// https://fetch.spec.whatwg.org/#concept-headers-append
- pub fn Append(&self, name: ByteString, value: ByteString) -> Result<(), Error> {
+ fn Append(&self, name: ByteString, value: ByteString) -> Result<(), Error> {
// Step 1
let value = normalize_value(value);