mirror of
https://github.com/gchq/CyberChef
synced 2025-12-19 01:33:45 +00:00
Added status message mechanism for the Worker to report to the app
This commit is contained in:
@@ -112,7 +112,21 @@ function loadRequiredModules(recipeConfig) {
|
||||
|
||||
if (!OpModules.hasOwnProperty(module)) {
|
||||
console.log("Loading module " + module);
|
||||
sendStatusMessage("Loading module " + module);
|
||||
self.importScripts(self.docURL + "/" + module + ".js");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send status update to the app.
|
||||
*
|
||||
* @param {string} msg
|
||||
*/
|
||||
function sendStatusMessage(msg) {
|
||||
self.postMessage({
|
||||
action: "statusMessage",
|
||||
data: msg
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user