Stats

331 Contributors: 10
2017-06-12
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook

Workers

Download javascript eBook

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.

Related Examples