Handling function added for 'stopScripts' operation.

Handling function added for 'stopScripts' operation.
This commit is contained in:
Łukasz M 2015-08-28 12:05:07 +02:00
parent 474df9671f
commit 7b677aec3a

View file

@ -306,6 +306,9 @@ Interpreter.prototype.initPrims = function() {
this.primitiveTable['timerReset'] = function(b) { interp.timerBase = Date.now(); };
this.primitiveTable['timer'] = function(b) { return (Date.now() - interp.timerBase) / 1000; };
// added by Lucas
this.primitiveTable['stopScripts'] = function(b) { interp.activeThread = new Thread(null); interp.threads = []; };
new Primitives().addPrimsTo(this.primitiveTable);
};