Skip to content

Function: serveWorker() ​

serveWorker(engines?): void

Serves the player's worker from the script it runs: the built-in engines, plus engines by the name of the element that creates them. Pass the script to the player's worker option.

Parameters ​

engines? ​

Record<string, EngineClass> = {}

Returns ​

void

Throws ​

TypeError for a name with whitespace, or one a built-in engine has.