Re: Intent to implement: Dynamic module imports (JS 'import()' syntax)

2018-10-22 Thread Jon Coppeard
On Saturday, 20 October 2018 09:54:05 UTC+1, David Baron wrote: > Have both Chrome and Safari shipped it without a secure context > restriction? Yes, it is supported outside of secure contexts in both Chrome and Safari. Jon ___ dev-platform mailing

Re: Intent to implement: Dynamic module imports (JS 'import()' syntax)

2018-10-20 Thread Luke Wagner
Since dynamic import is a core part of the JS language, with dedicated syntax (`import` is not a plain function, but a fixed syntactic form), it would seem to fall under the new, underlined JS exception in the first section of

Re: Intent to implement: Dynamic module imports (JS 'import()' syntax)

2018-10-20 Thread L. David Baron
On Thursday 2018-10-18 07:45 -0700, Jon Coppeard wrote: > Do other browser engines implement this? > > Chrome shipped this in 63, Safari in 11.1, and it's in development in Edge. > > web-platform-tests: > >

Re: Intent to implement: Dynamic module imports (JS 'import()' syntax)

2018-10-18 Thread Boris Zbarsky
On 10/18/18 10:45 AM, Jon Coppeard wrote: DevTools bug: I don't know whether there is DevTools work to do here or not.. I can think of several devtools things that would be nice to have: 1) A log of which modules got loaded (and when?) 2) Ability to break in a module once it gets loaded but

Intent to implement: Dynamic module imports (JS 'import()' syntax)

2018-10-18 Thread Jon Coppeard
Summary: This introduces a function-like import() syntax to JS that imports an ES6 module and returns a promise for that module's namespace. We currently support static module imports and these should be used where possible. However sometimes it's desirable to dynamically load code at