Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module doesn't work with legacy browsers #1

Open
marcoscaceres opened this issue Mar 13, 2014 · 2 comments
Open

Module doesn't work with legacy browsers #1

marcoscaceres opened this issue Mar 13, 2014 · 2 comments

Comments

@marcoscaceres
Copy link

For legacy reasons, I'm not sure we can add a new tag to the head? Doing so you end up with a dom that looks like this (based on your example in the explainer):

screenshot 2014-03-13 15 03 49

And you end up with the script being displayed in the page, also... which kinda sucks.

Maybe you want a link rel="module" instead and keep using <script defer> for inline modules?

@dherman
Copy link
Owner

dherman commented Mar 14, 2014

The stopgap solution should be a custom MIME type like <script type="application/javascript+module">. There's another evolutionary issue which is that legacy browsers won't treat it as implicitly CDATA. All of these issues are solved by allowing people to use the special script type as an interim syntax, and longer-term, once enough browsers support <module>, people can start using that.

But it's crucial to have the end state be a programming model where the syntax is as convenient as <script> is today (note that link rel="module" fails this explicit constraint listed in the requirements document).

I'll update the documents to reflect this before closing the issue.

@marcoscaceres
Copy link
Author

Thanks for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants