Rename web-worker → allow-web-workers for clarity.
The former was unclear about how the dependency would relate to web workers. Would it only be available to workers? Would it automatically spin up a worker? `allow-web-workers` isn't 100% perfect, but it implies the correct answers to the questions above (no and no) and isn't too long.
This commit is contained in:
@@ -159,7 +159,7 @@ 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)
|
||||
if (!dependency.allowWebWorkers)
|
||||
{
|
||||
script = 'if(typeof self === "undefined" || !self.constructor.name.includes("Worker")) { $script }';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user