Skip to content

Commit

Permalink
For HTML5 script tags you can omit the type attribute when its value …
Browse files Browse the repository at this point in the history
…is JavaScript. From MDN -> https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script - Omitted or a JavaScript MIME type: For HTML5-compliant browsers this indicates the script is JavaScript. HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type.
  • Loading branch information
jbampton authored and chriddyp committed Jan 8, 2018
1 parent 6c6ced1 commit 94ab1e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dash/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def _generate_scripts_html(self):
)

return '\n'.join([
'<script type="text/JavaScript" src="{}"></script>'.format(src)
'<script src="{}"></script>'.format(src)
for src in srcs
])

Expand Down
2 changes: 1 addition & 1 deletion tests/test_react.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def generate_css(css_links):

def generate_js(js_links):
return '\n'.join([
'<script type="text/JavaScript" src="{}"></script>'.format(l)
'<script src="{}"></script>'.format(l)
for l in js_links
])

Expand Down

0 comments on commit 94ab1e7

Please sign in to comment.