-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
I found myself putting together a fine-grained table of ES module features in https://github.com/guybedford/es-module-shims/#browser-support.
I thought it would be worth creating an issue here to share the fine-grained behaviours that have turned out necessary to test, as it's already become a process checking this data. If any of these are tracked in separate issues this can certainly be broken up and closed. Also if this falls outside of the existing process please let me know how I can better frame these points.
It's also worth specifically noting there are compatibility bugs where modules support isn't a simple yes or no - see the problems in Edge and Safari mentioned below.
To summarize the fine-grained metrics and compatibility adjustments:
- Basic Modules Support (Current HTML feature, Edge has a bug where modules were executed in reverse order, see Modules executing in reverse post-order chakra-core/ChakraCore#6261, I haven't properly worked out which versions this applies to)
- Dynamic import (JavaScript feature. Note that support for dynamic import in Web Workers is also a separate question here, as only Chrome supports that currently. There is another issue as well here where dynamic import does not respect the
<base>tag in Safari but does in other browsers, see https://bugs.webkit.org/show_bug.cgi?id=201692 CanIUse has a good support table for this). - import.meta.url (JavaScript feature, no source of the support table yet)
- Module workers (HTML feature, Chrome only currently, no source of the support table yet)
- Import Maps (HTML feature, Experimental Web Platform in Chrome, but should be stable in the next few months)
It would be really beneficial to see these fine-grained compatibility checks being visible to help ensure clarity for users and browser vendors.