Introduction to Web Workers API in JavaScript

Written by mozilla | Published 2020/05/04
Tech Story Tags: javascript | web-workers-api | front-end-development | mozilla | mdn-documentation | frontend | hackernoon-top-story | input-output

TLDR Web Workers makes it possible to run a script operation in a background thread separate from the main execution thread of a web application. The advantage of this is that laborious processing can be performed in a separate thread, allowing the main (usually the UI) thread to run without being blocked/slowed down. You can run whatever code you like inside the worker thread, with some exceptions. Workers run in another global context that is represented by either a DedicatedWorkerGlobalScope object (in the case of dedicated workers - workers that are utilized by a single script), or a SharedWorker globalScope.via the TL;DR App

no story

Written by mozilla | Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape.
Published by HackerNoon on 2020/05/04