名称
只读特性在
DedicatedWorkerGlobalScope
interface returns the name that the
Worker
was (optionally) given when it was created. This is the name that the
Worker()
constructor can pass to get a reference to the
DedicatedWorkerGlobalScope
.
var nameObj = self.name;
A
DOMString
.
If a worker is created using a constructor with a
名称
选项:
var myWorker = new Worker("worker.js", { name : "myWorker" });
the
DedicatedWorkerGlobalScope
will now have a name of "myWorker", returnable by running
self.name
from inside the worker.
| 规范 | 状态 | 注释 |
|---|---|---|
|
HTML 实时标准
The definition of 'name' in that specification. |
实时标准 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
名称
|
Chrome Yes | Edge ≤79 | Firefox 55 | IE 不支持 No | Opera ? | Safari 不支持 No | WebView Android Yes | Chrome Android Yes | Firefox Android 55 | Opera Android ? | Safari iOS 不支持 No | Samsung Internet Android Yes |
完整支持
不支持
兼容性未知