terminate()
方法在
Worker
interface immediately terminates the
Worker
. This does not offer the worker an opportunity to finish its operations; it is simply stopped at once.
myWorker.terminate();
None.
Void.
The following code snippet shows creation of a
Worker
对象使用
Worker()
constructor, which is then immediately terminated.
var myWorker = new Worker('worker.js');
myWorker.terminate();
| 规范 | 状态 | 注释 |
|---|---|---|
|
HTML 实时标准
The definition of 'Worker.terminate()' in that specification. |
实时标准 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
terminate
|
Chrome 4 | Edge 12 | Firefox 3.5 | IE 10 | Opera 10.6 | Safari 4 | WebView Android 4 | Chrome Android 18 | Firefox Android 4 | Opera Android 11 | Safari iOS 5.1 | Samsung Internet Android 1.0 |
完整支持
Worker
interface it belongs to.
Worker
postMessage()
terminate()