Rename web-workerallow-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:
Joseph Cloutier
2024-06-15 22:13:05 -04:00
parent 7019abb9fc
commit 593f4fa52c
4 changed files with 5 additions and 5 deletions

View File

@@ -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 }';
}