function loadJavaScript(url, success) {
let domScript = document.createElement('script');
domScript.src = url;
success = success || function () {};
domScript.onload = domScript.onreadystatechange = function () {
if (!this.readyState || 'loaded' === this.readyState || 'complete' === this.readyState) {
success();
this.onload = this.onreadystatechange = null;
this.parentNode.removeChild(this);
}
}
document.getElementsByTagName('head')[0].appendChild(domScript);
}
loadJavaScript('../../static/js/plugin/vue.js', function () {
// do it!
})