Gil Fink's Blog

February 17, 2013

Importing Scripts in Web Workers While implementing a background task in a HTML5/JavaScript Windows Store app, I had the need to import scripts in the background task. Since background tasks are implemented on top of Web Workers, I used the importScripts function which is a global function that Web Workers can use to import scripts. In this post I’ll explain how to use the function and show a simple use example. The importScripts Function The importScripts function is a global function that Web Workers can use to load and execute additional scripts. You will use that...