detecting JS language mode for tools

John Barton johnjbarton at google.com
Mon Jan 27 18:25:36 PST 2014


On Sat, Jan 25, 2014 at 3:31 PM, Brendan Eich <brendan at mozilla.com> wrote:

> John Barton wrote:
>
>> The Script goal disallows 'import' and 'export' specifically to ensure
>> that the Script goal is inconvenient for developers and thus they are
>> encouraged to shift to the Module goal.
>>
>
> No, that's not the rationale. The reason is to avoid enabling more
> synchronous <script src=>-style jank. We have enough of that already with
> the existing attractive nuisance (script src= w/o async), per Steve Souders.
>
> /be
>

Why can't <script type='module'> mean "If we see import/export/module
statements then we will will not evaluate the body synchronously."? That
way we avoid the jank with new code just as we do with two parsing goals
and yet we don't need two parsing goals.

jjb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140127/cb7b7598/attachment.html>


More information about the es-discuss mailing list