Worker constructor

Worker(
  1. String path,
  2. WorkerOptions options
)

Creates a new web worker that executes the script at the given path, using the provided options.

  • path: A string URL pointing to the worker script.
  • options: Optional settings like type: 'module' for ES module workers.

Implementation

external factory Worker(String path, WorkerOptions options);