Fix web worker errors.
It took a lot of work to get web workers to work, but web workers finally work! `transferList` doesn't seem to work, though. It makes the object inaccessible as expected, but it doesn't seem to affect performance.
This commit is contained in:
@@ -93,6 +93,10 @@ class HTML5Platform extends PlatformTarget
|
||||
if (dependency.embed && StringTools.endsWith(dependency.path, ".js") && FileSystem.exists(dependency.path))
|
||||
{
|
||||
var script = File.getContent(dependency.path);
|
||||
if (!dependency.webWorker)
|
||||
{
|
||||
script = 'if(typeof window != "undefined") {\n' + script + "\n}";
|
||||
}
|
||||
context.embeddedLibraries.push(script);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user