Add JS dependency manager

Added LoadJS(https://github.com/muicss/loadjs) and migrated Quill interop to use LoadJS.
This commit is contained in:
Jim Spillane
2020-06-10 21:09:10 -04:00
parent 2ceeb25d0e
commit 5124dea72c
8 changed files with 58 additions and 22 deletions

View File

@ -321,5 +321,15 @@ Oqtane.Interop = {
setInterval(function () {
window.location.href = url;
}, wait * 1000);
},
loadInteropScript: async function (filePath) {
const promise = new Promise((resolve, reject) => {
loadjs(filePath, { returnPromise: true })
.then(function () { resolve(true) })
.catch(function (pathsNotFound) { reject(false) });
});
const result = await promise;
return;
}
};