stewartpark / Flask-JSGlue

Flask-JSGlue helps hook up your Flask application nicely with the front end.
80 stars 40 forks source link

Allow deferred loading of script #27

Closed le717 closed 4 years ago

le717 commented 5 years ago

This PR allows the script loading to be deferred for improved loading performance, default off to preserve compatibility with existing sites. It can be enabled by passing (by keyword only!) defer=True to JSGlue.include() in a template file.

I do not know how to add a test for this but it is easily manually checked to ensure it works.