worker fails on firefox because it refuses to clone objects containing function props
This commit is contained in:
parent
e291bbfed3
commit
e0c9179730
1 changed files with 4 additions and 5 deletions
|
|
@ -158,12 +158,11 @@ var WorkerClient = function(topLevelNamespaces, packagedJs, module, classname) {
|
|||
|
||||
this.emit = function(event, data) {
|
||||
try {
|
||||
this.$worker.postMessage({event: event, data: data});
|
||||
}
|
||||
catch(ex) {
|
||||
console.log("no worker");
|
||||
console.trace();
|
||||
// firefox refuses to clone objects which have function properties
|
||||
// TODO: cleanup event
|
||||
this.$worker.postMessage({event: event, data: {data: data.data}});
|
||||
}
|
||||
catch(ex) {}
|
||||
};
|
||||
|
||||
this.attachToDocument = function(doc) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue