aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/worker.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-06-22 18:07:14 +0200
committerMs2ger <ms2ger@gmail.com>2014-07-15 22:29:03 +0200
commit712955e96abd9606dbc69bf48d9e171c06ce1299 (patch)
treea9a7e93d5a3b48f11766dd4577bac506e6f7eb51 /src/components/script/dom/worker.rs
parentd97ec6995773ee79fbde053520bc580e7b33d15d (diff)
downloadservo-712955e96abd9606dbc69bf48d9e171c06ce1299.tar.gz
servo-712955e96abd9606dbc69bf48d9e171c06ce1299.zip
Implement a stub Worker interface.
Part of #2811.
Diffstat (limited to 'src/components/script/dom/worker.rs')
-rw-r--r--src/components/script/dom/worker.rs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/components/script/dom/worker.rs b/src/components/script/dom/worker.rs
new file mode 100644
index 00000000000..6c79525a139
--- /dev/null
+++ b/src/components/script/dom/worker.rs
@@ -0,0 +1,31 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use dom::bindings::error::{Fallible, Security};
+use dom::bindings::global::GlobalRef;
+use dom::bindings::js::Temporary;
+use dom::bindings::utils::{Reflectable, Reflector};
+use dom::eventtarget::EventTarget;
+
+use servo_util::str::DOMString;
+
+#[deriving(Encodable)]
+pub struct Worker {
+ eventtarget: EventTarget,
+}
+
+impl Worker {
+ pub fn Constructor(_global: &GlobalRef, _scriptURL: DOMString) -> Fallible<Temporary<Worker>> {
+ Err(Security)
+ }
+}
+
+pub trait WorkerMethods {
+}
+
+impl Reflectable for Worker {
+ fn reflector<'a>(&'a self) -> &'a Reflector {
+ self.eventtarget.reflector()
+ }
+}