What's the difference between importScripts and ES6 modules/import?

Viewed 2966

I currently implement a front-end along with a service worker. As I require several code pieces for my service worker, I opted to use the importScripts function from the standard.

I really don't get why importScripts was added to this standard as modules became part of the ES6 standard about 3 years ago (although still missing in most browsers, if not using a flag).

Can someone elaborate on this? I assume it's related to the error handling and the like...

1 Answers
Related