Method 1 : Creating a New Script Element
This method uses the document.createElement to create a new <script> tag, and append it in the page.
Disadvantage : Cannot get loading percentage
This method also involves creating a new <script> tag, but the source of the script is downloaded through AJAX. After downloading the source is added as the contents of the new script tag.
Advantage : Can get the progress of the downloading file
Disadvantage : For cross-domain files, it needs CORS headers, otherwise the browser Cross-Origin Policy will not allow the script to run