aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/engine_interface.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/engine_interface.rs')
-rw-r--r--src/components/script/engine_interface.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/components/script/engine_interface.rs b/src/components/script/engine_interface.rs
index 2705ebdb137..c7a33334c97 100644
--- a/src/components/script/engine_interface.rs
+++ b/src/components/script/engine_interface.rs
@@ -8,7 +8,21 @@
use core::comm::{Chan, SharedChan};
use std::net::url::Url;
-pub type EngineTask = SharedChan<Msg>;
+#[deriving(Clone)]
+pub struct EngineChan {
+ chan: SharedChan<Msg>,
+}
+
+impl EngineChan {
+ pub fn new(chan: Chan<Msg>) -> EngineChan {
+ EngineChan {
+ chan: SharedChan::new(chan),
+ }
+ }
+ pub fn send(&self, msg: Msg) {
+ self.chan.send(msg);
+ }
+}
pub enum Msg {
LoadUrlMsg(Url),