importScripts(); /* imports nothing */importScripts(‘foo.js’); /* imports just “foo.js” */importScripts(‘foo.js’, ‘bar.js’); /* imports two scripts */importScripts(‘//example.com/hello.js’); /* You can import scripts from other origins */
Scripts may be downloaded inany order, but will be executed inthe order inwhich you pass the filenames into importScripts() . This is done synchronously; importScripts() does not returnuntil all the scripts have been loaded and executed.