Contact emails
[email protected] <mailto:[email protected]>, [email protected] 
<mailto:[email protected]>

Explainer
https://github.com/tc39/proposal-defer-import-eval

Specification
https://tc39.es/proposal-defer-import-eval

Summary
`import defer` allows lazily evaluating ES modules, to reduce the startup 
impact of modules that are not actually needed for the first JavaScript 
execution. This provides an easier-to-use alternative to dynamic import. While 
dynamic import provides more benefits, as it allows deferring loading of 
modules rather than just evaluation, it has a lot of friction due to its 
asynchronous nature, and thus it's not always usable. The `import defer` TC39 
proposal follows the same syntax as `import source`, but it only works with 
namespace imports: ``` import defer * as namespace from "./some-module.js" ``` 
The module will be synchronously executed on property access on the module 
namespace object. To allow synchronous execution, not all of 
`./some-module.js`'s dependency tree will be deferred. Modules that contain 
top-level await will be eagerly executed, leaving only the synchronous parts of 
the tree for later.

Blink component
Blink>JavaScript 
<https://issues.chromium.org/issues?q=customfield1222907:%22Blink%3EJavaScript%22>

Web Feature ID
import-defer <https://webstatus.dev/features/import-defer>

Motivation
No information provided

Initial public proposal
No information provided

TAG review
No information provided

TAG review status
Not applicable

Goals for experimentation
None

Risks


Interoperability and Compatibility
No information provided

Gecko: Positive (https://bugzilla.mozilla.org/show_bug.cgi?id=1952263) Mozilla 
was originally championing the proposal

WebKit: Shipped/Shipping (https://bugs.webkit.org/show_bug.cgi?id=320867)

Web developers: No signals

Other signals:

WebView application risks
Does this intent deprecate or change behavior of existing APIs, such that it 
has potentially high risk for Android WebView-based applications?
No information provided


Debuggability

Changes were added to CDP to properly support feature UX (for detailed 
information, see https://issues.chromium.org/issues/552666773)

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, 
ChromeOS, Android, and Android WebView)?
No

Is this feature fully tested by web-platform-tests 
<https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>?
Yes
Test262 tests: - 
https://github.com/tc39/test262/tree/main/test/language/import/import-defer - 
https://github.com/tc39/test262/tree/main/test/language/expressions/dynamic-import/import-defer

Flag name on about://flags
No information provided

Finch feature name
V8Flag_js_defer_import_eval

Rollout plan
Will ship enabled for all users

Requires code in //chrome?
False

Tracking bug
https://issues.chromium.org/issues/398218423

Estimated milestones
Shipping on desktop     155
Shipping on Android     155
Shipping on WebView     155


Anticipated spec changes
Open questions about a feature may be a source of future web compat or interop 
issues. Please list open issues (e.g. links to known github issues in the 
project for the feature specification) whose resolution may introduce web 
compat/interop risk (e.g., changing to naming or structure of the API in a 
non-backward-compatible way).
No information provided

Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5071131271888896?gate=6546259918848000

This intent message was generated by Chrome Platform Status 
<https://chromestatus.com/>.

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/C3AAB10F-3791-4B36-A5D2-92CEA299B90A%40igalia.com.

Reply via email to