aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/worker.rs
diff options
context:
space:
mode:
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()
+ }
+}