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

add async attribute to the tag #55

Open
oppianmatt opened this issue Aug 6, 2015 · 1 comment
Open

add async attribute to the tag #55

oppianmatt opened this issue Aug 6, 2015 · 1 comment

Comments

@oppianmatt
Copy link

Can we update the template tag to output with an async attribute? Or if not backwards compatible perhaps a keyword on the template tag 'async' to do so.

http://requirejs.org/docs/start.html

For browsers that support it, you could also add an async attribute to the script tag.

e.g.

<script src="static/js/require.a3f22c5ad833.js" data-main="static/js/search.bf074024de9e.js">

becomes

<script src="static/js/require.a3f22c5ad833.js" data-main="static/js/search.bf074024de9e.js" async defer>

https://www.igvita.com/2014/05/20/script-injected-async-scripts-considered-harmful/

@etianen
Copy link
Owner

etianen commented Aug 6, 2015

I think that this would have to be a keyword on the template tag, since
it's not backwards compatible.

I'd take a pull request for this.

On Thu, 6 Aug 2015 at 16:36 Matthew Jacobi notifications@github.com wrote:

Can we update the template tag to output with an async attribute? Or if
not backwards compatible perhaps a keyword on the template tag 'async' to
do so.

http://requirejs.org/docs/start.html

For browsers that support it, you could also add an async attribute to the
script tag.

e.g.

<script src="static/js/require.a3f22c5ad833.js" data-main="static/js/search.bf074024de9e.js"> becomes <script src="static/js/require.a3f22c5ad833.js" data-main="static/js/search.bf074024de9e.js" async defer> https://www.igvita.com/2014/05/20/script-injected-async-scripts-considered-harmful/ — Reply to this email directly or view it on GitHub https://github.com//issues/55.

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