associate setting with JSF-block rather than the evaluator

snap7
jmoenig 2021-06-14 22:53:12 +02:00
rodzic 02509e157d
commit 4b5e091b39
2 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -10,6 +10,7 @@
* updated animation library
* updated frequency-distribution-analysis library
* extensions: added some world-map extension primitives
* threads: associate setting with JSF-block rather than the evaluator
## 6.9.0
* **Notable Changes:**

Wyświetl plik

@ -1208,6 +1208,9 @@ Process.prototype.reifyPredicate = function (topBlock, parameterNames) {
};
Process.prototype.reportJSFunction = function (parmNames, body) {
if (!this.enableJS) {
throw new Error('JavaScript extensions for Snap!\nare turned off');
}
return Function.apply(
null,
parmNames.itemsArray().concat([body])
@ -1227,9 +1230,11 @@ Process.prototype.evaluate = function (
return this.returnValueToParentContext(null);
}
if (context instanceof Function) {
/*
if (!this.enableJS) {
throw new Error('JavaScript extensions for Snap!\nare turned off');
}
*/
return context.apply(
this.blockReceiver(),
args.itemsArray().concat([this])