JavaScriptWorkers


Syntax

  • new Worker(file)
  • postMessage(data, transfers)
  • onmessage = function(message) { /* ... */ }
  • onerror = function(message) { /* ... */ }
  • terminate()

Remarks

  • Service workers are only enabled for websites served over HTTPS.