Implement <script nomodule>

Fixed Issue #10525830

Details

Author
Simon P.
Created
Jan 13, 2017
Privacy
This issue is public.
Fixed in build #
16.16241
Reports
Reported by 4 people

Sign in to watch or report this issue.

Steps to reproduce

Discussion: https://github.com/whatwg/html/issues/1442.

Change: https://github.com/whatwg/html/pull/2261.

If for some reason we don’t think this is a good idea now would be the time to object. (Too late, we didn’t object :-)

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Jeff W.”

      Changed Status to “Confirmed”

      Changed Steps to Reproduce

    • Microsoft Edge Team

      Changed Status from “Confirmed” to “In code review”

      Changed Status from “In code review” to “Fixed”

    • This is now implemented, and will be shipped in an upcoming Windows Insider flight.

    • will this fix be in Fall Creators Update?

    • Yes, nomodule support will be in the Fall Creators Update, and should have first appeared in Windows Insider flights starting with build 16241+.  Not sure why the status of this still says "not yet flighted"…I’ll have to follow up on that.

    • Any update on when this will be "flighted"?

    • As mentioned in my comment right before yours, our infrastructure is incorrectly listing this as not-yet-flighted.  “nomodule” shipped in the Fall Creators Update.

    • This is only partially fixed. While Edge doesn’t execute the nomodule scripts, it still downloads them, incurring a performance penalty for the user. This makes the pattern that nukes most of the benefits of nomodule existence, i.e. including the following in HTML:

      
      
      

      Every user should download just one file but Edge will download both. Other browsers (Chrome, Safari, Firefox) will only download the module one (once modules are enabled in Firefox which will happen soon).

      Chrome & Safari also don’t download scripts with unknown types which Firefox & Edge do. There’s an issue about that for Firefox at https://bugzilla.mozilla.org/show_bug.cgi?id=838521.

      A test case is at http://plnkr.co/edit/Wa8yrSjWIJsYPg7QGWRR?p=preview. HTML shows which scripts got executed but if you open DevTools you’ll see all of them are executed anyway.

    • The bug tracker comment system nuked my script tags from the code block… They appeared correctly in the preview. I meant the following (I hope it’ll work this time):

    • …it doesn’t, heh. I meant two scripts; first with the following attributes:

      type="module" src="app-modern.js"

      and the second one with the following ones:

      nomodule src="app-legacy.js"

    • Thanks for reporting. We have an internal bug open for the fact that the script is still downloaded. I’ll try to make it public so that folks can track it.

    • Please see this public issue to track our progress on the download issue: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/15088709/

    • Nolan: Thanks for the link. Do you have another issue for not downloading scripts with unrecognized types in general? That’s how Chrome & Safari behaves and Firefox is updating its behavior right now in https://bugzilla.mozilla.org/show_bug.cgi?id=838521.

    • Thanks for reporting the issue with unrecognized types. I opened a new issue here: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/15988458/

    You need to sign in to your Microsoft account to add a comment.

    Sign in