-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
html/template: add support for JavaScript modules. #27697
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
CLAs look good, thanks! |
This PR (HEAD: 3f7ae40) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/135417 to see it. Tip: You can toggle comments from me using the |
Message from Gerrit User 5976: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/135417. |
Message from Andrew Bonventre: Patch Set 1: (1 comment) Thanks for your change and apologies for the delay. The primary question I have is whether JS modules are out of draft spec mode or not. Python has added support for the .mjs extension as a reference (https://bugs.python.org/issue31715). But this discussion seems better on an issue. Thanks Please don’t reply on this GitHub thread. Visit golang.org/cl/135417. |
Message from Agniva De Sarker: Patch Set 1:
JS modules are a standard now - https://html.spec.whatwg.org/multipage/scripting.html#the-script-element. Please don’t reply on this GitHub thread. Visit golang.org/cl/135417. |
Message from Andrew Bonventre: Patch Set 1:
Thanks. Will leave it to Brad to decide. Should that be added to the list of references above? The changes to the commit message still stand and this needs a test case added to TestIsJsMimeType in js-test.go. Please don’t reply on this GitHub thread. Visit golang.org/cl/135417. |
Message from Agniva De Sarker: Patch Set 1:
Actually, it is there in the first link - https://www.w3.org/TR/html5/semantics-scripting.html#element-attrdef-script-type.
Please don’t reply on this GitHub thread. Visit golang.org/cl/135417. |
Message from Emmanuel Odeke: Patch Set 1: Thank you for this change Tomuta! Could you please file an issue on the Go issue tracker at https://github.com/golang/go/issues? It is useful for a discussion such as the one Thank you. Please don’t reply on this GitHub thread. Visit golang.org/cl/135417. |
Message from Mike Samuel: Patch Set 1: Code-Review+1 Looks good per https://html.spec.whatwg.org/multipage/scripting.html#the-script-element:module-script-2 Please don’t reply on this GitHub thread. Visit golang.org/cl/135417. |
Message from Andrew Bonventre: Patch Set 1: Please fix pending comments. Thanks. Please don’t reply on this GitHub thread. Visit golang.org/cl/135417. |
Message from Andrew Bonventre: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/135417. |
Message from Emmanuel Odeke: Patch Set 1: (1 comment) Please remove the markdown as Andrew suggested and also please update the commit message as below. Please don’t reply on this GitHub thread. Visit golang.org/cl/135417. |
Message from Benny Siegert: Patch Set 1: Run-TryBot+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/135417. |
Message from Gobot Gobot: Patch Set 1: TryBots beginning. Status page: https://farmer.golang.org/try?commit=b73112e4 Please don’t reply on this GitHub thread. Visit golang.org/cl/135417. |
Message from Gobot Gobot: Patch Set 1: Build is still in progress... Other builds still in progress; subsequent failure notices suppressed until final report. Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test exactly your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed. Please don’t reply on this GitHub thread. Visit golang.org/cl/135417. |
This PR is being closed because golang.org/cl/135417 has been abandoned. due to no response from author, continued at https://go-review.googlesource.com/c/go/+/175218 |
html/template does not properly treat JavaScript code as JavaScript when using a <script>
tag with "module" set as the name attribute.
See also:
https://www.w3.org/TR/html5/semantics-scripting.html#element-attrdef-script-type and
https://html.spec.whatwg.org/multipage/scripting.html#the-script-element:module-script-2
Fixes #31327