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

html/template: add support for JavaScript modules. #27697

Closed
wants to merge 1 commit into from
Closed

html/template: add support for JavaScript modules. #27697

wants to merge 1 commit into from

Conversation

tomuta
Copy link

@tomuta tomuta commented Sep 15, 2018

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

@googlebot
Copy link

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. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@googlebot googlebot added the cla: no Used by googlebot to label PRs as having an invalid CLA. The text of this label should not change. label Sep 15, 2018
@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. and removed cla: no Used by googlebot to label PRs as having an invalid CLA. The text of this label should not change. labels Sep 15, 2018
@gopherbot
Copy link
Contributor

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 comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Gerrit User 5976:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
Within the next week or so, a maintainer will review your change and provide
feedback. See https://golang.org/doc/contribute.html#review for more info and
tips to get your patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11, it means that this CL will be reviewed as part of the next development
cycle. See https://golang.org/s/release for more details.


Please don’t reply on this GitHub thread. Visit golang.org/cl/135417.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

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.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Agniva De Sarker:

Patch Set 1:

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

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.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Andrew Bonventre:

Patch Set 1:

Patch Set 1:

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

JS modules are a standard now - https://html.spec.whatwg.org/multipage/scripting.html#the-script-element.

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.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Agniva De Sarker:

Patch Set 1:

Patch Set 1:

Patch Set 1:

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

JS modules are a standard now - https://html.spec.whatwg.org/multipage/scripting.html#the-script-element.

Thanks. Will leave it to Brad to decide. Should that be added to the list of references above?

Actually, it is there in the first link - https://www.w3.org/TR/html5/semantics-scripting.html#element-attrdef-script-type.

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.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

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
that's going on, on this CL yet that discussion isn't as accessible nor indexed nor
searchable.
Without a corresponding issue, it might be difficult to later on to examine security issues, regressions and reasons why we made certain decisions.

Thank you.


Please don’t reply on this GitHub thread. Visit golang.org/cl/135417.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

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.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

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.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Andrew Bonventre:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/135417.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

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.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

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.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

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.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 1:

Build is still in progress...
This change failed on freebsd-amd64-12_0:
See https://storage.googleapis.com/go-build-log/b73112e4/freebsd-amd64-12_0_43061838.log

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.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 1: TryBot-Result-1

8 of 20 TryBots failed:
Failed on freebsd-amd64-12_0: https://storage.googleapis.com/go-build-log/b73112e4/freebsd-amd64-12_0_43061838.log
Failed on linux-amd64: https://storage.googleapis.com/go-build-log/b73112e4/linux-amd64_a25b43e9.log
Failed on openbsd-amd64-64: https://storage.googleapis.com/go-build-log/b73112e4/openbsd-amd64-64_43b80bd3.log
Failed on linux-386: https://storage.googleapis.com/go-build-log/b73112e4/linux-386_38092707.log
Failed on android-amd64-emu: https://storage.googleapis.com/go-build-log/b73112e4/android-amd64-emu_f3f17870.log
Failed on linux-amd64-race: https://storage.googleapis.com/go-build-log/b73112e4/linux-amd64-race_55893d2c.log
Failed on windows-amd64-2016: https://storage.googleapis.com/go-build-log/b73112e4/windows-amd64-2016_caa34b30.log
Failed on windows-386-2008: https://storage.googleapis.com/go-build-log/b73112e4/windows-386-2008_9cf2fa92.log

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.
After addressing review feedback, remember to publish your drafts!

@andybons andybons changed the title html/template: Add support for JavaScript modules. html/template: add support for JavaScript modules. May 5, 2019
@gopherbot
Copy link
Contributor

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

@gopherbot gopherbot closed this May 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

html/template: add support for JavaScript modules
3 participants