Add loop-protect
Remove webworkers
This commit is contained in:
17
client/commonFramework/add-loop-protect.js
Normal file
17
client/commonFramework/add-loop-protect.js
Normal file
@@ -0,0 +1,17 @@
|
||||
window.common = (function(global) {
|
||||
const {
|
||||
loopProtect,
|
||||
common = { init: [] }
|
||||
} = global;
|
||||
|
||||
loopProtect.hit = function hit(line) {
|
||||
var err = `Error: Exiting potential infinite loop at line ${line}.`;
|
||||
console.error(err);
|
||||
};
|
||||
|
||||
common.addLoopProtect = function addLoopProtect(code = '') {
|
||||
return loopProtect(code);
|
||||
};
|
||||
|
||||
return common;
|
||||
})(window);
|
Reference in New Issue
Block a user