Extract file load to queue

This enables other parsers to keep their load function in the same file
This commit is contained in:
Dominik Reh
2023-02-10 11:55:56 +01:00
parent 890f1a48c2
commit cbeced9121
8 changed files with 119 additions and 94 deletions

View File

@@ -96,9 +96,9 @@ function escapeHTML(unsafeText) {
}
// Queue calling function to process global queues
function processQueue(queue, context, ...args) {
async function processQueue(queue, context, ...args) {
for (let i = 0; i < queue.length; i++) {
queue[i].call(context, ...args);
await queue[i].call(context, ...args);
}
}
// The same but with return values