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).
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 #