Contact emails
V8 implementation: gsa...@chromium.org
Blink implementation: kou...@chromium.org
Spec: dom...@chromium.org
Explainer
N/A
Spec
JavaScript side: https://tc39.github.io/proposal-dynamic-import/
This is a stage 3 proposal, which per the TC39 process is the appropriate time to implement (and ship).
Web side: https://github.com/whatwg/html/pull/3044 (derived from an earlier draft); preview
Summary
import() is an addition to the JavaScript module system which allows dynamic importing of modules, as opposed to the static/declarative importing provided by the import declaration. It is a new JavaScript "function-like" syntactic form, similar to super().
Link to “Intent to Implement” blink-dev discussion
https://groups.google.com/a/chromium.org/d/msg/blink-dev/wRLMM5-kpCY/Y0be_ASaAwAJ
Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
Demo link
https://dynamic-import.firebaseapp.com/
Risks
Interoperability and Compatibility
This is a mature feature in the TC39 process, implying at least support from all the JavaScript engine teams from each browser. We anticipate it being implemented rapidly, either alongside initial implementations of JavaScript modules or shortly thereafter.
Edge: Shipped in ChakraCore; in progress in Edge
Firefox: Public support in TC39 (Bugzilla tracking bug)
Safari: Shipped in Safari 11
Web developers: Strongly positive
Ergonomics
N/A
Activation
This is a straightforward API with clear performance benefits. So, we expect that adoption will be good with the usual level of efforts around awareness.
Is this feature fully tested by web-platform-tests?
Yes. They are at https://github.com/w3c/web-platform-tests/tree/master/html/semantics/scripting-1/the-script-element/module/dynamic-import
We confirmed that Safari Tech Preview passes all of them.
Chrome ToT currently passes tests with the exception of “dynamic import from classic script w/ CSP+SRI enabled” case, which we plan to fix shortly before flipping the flag by default.
Entry on the feature dashboard
https://www.chromestatus.com/feature/5684934484164608
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPVAxLXb471F_QKF5Kxv-4-KcfvNhi_RuDmLxELnXC5uk9hRAA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGH7WqHp%2BGJ0BQnOXDFg1sEF_Rt7m%3DHUy9akatD3vq9Ub1ivyw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOtFfx7UodG5_CdWU%3DHnM-cye4AMus%2ByhZqLNbiKGTdHr4ufMg%40mail.gmail.com.