On-Demand Script Loading with JavaScript

In this screencast a script is dynamically loaded by user action (with click on a button) and without any external libraries:

Dynamic script loading is particularly useful for polyfills, which can be conditionally loaded depending on browser's capabilities.

See you at Single Page Applications (SPAs) -- the "no frameworks, no migrations" approach, at Munich Airport, Terminal 2 or webstandards.training (online).


NEW: Online Workhop Effective WebApps without Frameworks is also coming to: MUC Airport.

Airport MUC workshops: Web (SPA, PWAs, Offline, Desktop, Mobile) Applications Essentials and Effective Web Applications. No migrations. #usetheplatform

Podcast: airhacks.fm and newsletter: airhacks.news

A book about rethinking Java EE Patterns

Comments:

Thank you, nice use of promises.

If im not mistaken, most interesting part was that script loaded just once even after multiple button clicks.

Posted by Martin Novak on November 08, 2018 at 02:35 PM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
Online Workshops
realworldpatterns.com
...the last 150 posts
...the last 10 comments
License