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) {
|
this.emit = function(event, data) {
|
||||||
try {
|
try {
|
||||||
this.$worker.postMessage({event: event, data: data});
|
// firefox refuses to clone objects which have function properties
|
||||||
}
|
// TODO: cleanup event
|
||||||
catch(ex) {
|
this.$worker.postMessage({event: event, data: {data: data.data}});
|
||||||
console.log("no worker");
|
|
||||||
console.trace();
|
|
||||||
}
|
}
|
||||||
|
catch(ex) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.attachToDocument = function(doc) {
|
this.attachToDocument = function(doc) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue