kopia lustrzana https://github.com/backface/turtlestitch
Allow JS-functions for invoke()
rodzic
cdd6d3e06f
commit
c7f3a0cd4d
|
@ -3947,6 +3947,10 @@ Translation Updates:
|
|||
* Store, GUI: small tweaks
|
||||
* new Valencian Catalan translation, thanks, Jose A. Múrcia!!
|
||||
|
||||
180212
|
||||
------
|
||||
* Threads: Allow JS-functions for invoke()
|
||||
|
||||
|
||||
=== v4.1.2 features ===
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
|
|||
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph,
|
||||
TableFrameMorph, ColorSlotMorph, isSnapObject*/
|
||||
|
||||
modules.threads = '2018-January-25';
|
||||
modules.threads = '2018-February-12';
|
||||
|
||||
var ThreadManager;
|
||||
var Process;
|
||||
|
@ -151,6 +151,8 @@ function invoke(
|
|||
);
|
||||
} else if (action.evaluate) {
|
||||
return action.evaluate();
|
||||
} else if (action instanceof Function) {
|
||||
return action.apply(receiver, contextArgs.asArray());
|
||||
} else {
|
||||
throw new Error('expecting a block or ring but getting ' + action);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue