Introduce GlobalScope::script_chan

This commit is contained in:
Anthony Ramine 2016-10-04 00:35:16 +02:00
parent 71236e168a
commit a7305b7fc4
4 changed files with 19 additions and 14 deletions

View file

@ -330,8 +330,10 @@ impl WebSocket {
address: address,
};
let global = self.global();
global.r().script_chan().send(CommonScriptMsg::RunnableMsg(WebSocketEvent, task)).unwrap();
self.global_scope()
.script_chan()
.send(CommonScriptMsg::RunnableMsg(WebSocketEvent, task))
.unwrap();
}
Ok(true)