OptionalcredentialsOptionalnameA string specifying an identifying name for the DedicatedWorkerGlobalScope representing the scope of the worker, which is mainly useful for debugging purposes.
OptionaltypeA string specifying the type of worker to create. The value can be classic or module. The default is classic.
A string specifying whether the browser sends credentials when importing modules into a module worker. The allowed values are the same as can be passed to the fetch() request: omit, same-origin, or include. The default is same-origin (only include credentials for same-origin requests). This is ignored for classic workers.