Worker

@JSImport("node:worker_threads", "Worker") @native @JSType class Worker extends StObject
trait StObject
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Constructors

def this(filename: URL_)
def this(filename: String)
Value Params
filename

The path to the Worker’s main script or module. Must be either an absolute path or a relative path (i.e. relative to the current working directory) starting with ./ or ../, or a WHATWG URL object using file: protocol. If options.eval is true, this is a string containing JavaScript code rather than a path.

def this(filename: URL_, options: WorkerOptions)
def this(filename: String, options: WorkerOptions)

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from
Object
def isPrototypeOf(v: Object): Boolean
Inherited from
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from
Object
def toLocaleString(): String
Inherited from
Object
def valueOf(): Any
Inherited from
Object