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

Remove redundant type="text/javascript" from <script> elements #6925

Merged
merged 1 commit into from
Dec 15, 2019
Merged

Remove redundant type="text/javascript" from <script> elements #6925

merged 1 commit into from
Dec 15, 2019

Conversation

jdufresne
Copy link
Contributor

In HTML5, <script> elements default to MIME type text/javascript. The HTML5 living standard and MDN recommend against including the attribute.

From https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-type

The HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type.

From https://html.spec.whatwg.org/#the-script-element

Authors should omit the type attribute instead of redundantly setting it.

Copy link
Member

@tk0miya tk0miya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Could you rebase this into 2.0 branch? Then I'll merge this soon.

@jdufresne jdufresne changed the base branch from master to 2.0 December 15, 2019 15:20
@jdufresne
Copy link
Contributor Author

Rebased 🙂

Copy link
Member

@tk0miya tk0miya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nits.

In HTML5, <script> elements default to MIME type text/javascript. The
HTML5 living standard and MDN recommend against including the attribute.

From https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-type

> The HTML5 specification urges authors to omit the attribute rather
> than provide a redundant MIME type.

From https://html.spec.whatwg.org/#the-script-element

> Authors should omit the type attribute instead of redundantly setting
> it.
@jdufresne
Copy link
Contributor Author

Restored blank line.

Copy link
Member

@tk0miya tk0miya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for quick fix!

@tk0miya tk0miya merged commit 9b958f9 into sphinx-doc:2.0 Dec 15, 2019
@tk0miya
Copy link
Member

tk0miya commented Dec 15, 2019

Merged.

tk0miya added a commit that referenced this pull request Dec 15, 2019
@tk0miya tk0miya added this to the 2.4.0 milestone Dec 15, 2019
@jdufresne jdufresne deleted the text-js branch November 25, 2020 17:46
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants