mirror of
https://github.com/gchq/CyberChef
synced 2025-12-15 15:53:30 +00:00
Calls to window and document in src/core/ no longer break non-browser environments
This commit is contained in:
@@ -58,6 +58,10 @@ const URL_ = {
|
||||
* @returns {string}
|
||||
*/
|
||||
runParse: function(input, args) {
|
||||
if (!document) {
|
||||
throw "This operation only works in a browser.";
|
||||
}
|
||||
|
||||
var a = document.createElement("a");
|
||||
|
||||
// Overwrite base href which will be the current CyberChef URL to reduce confusion.
|
||||
|
||||
Reference in New Issue
Block a user