diff options
| author | jmoenig <jens@moenig.org> | 2014-08-13 17:43:49 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2014-08-13 17:43:49 +0200 |
| commit | 130e105ea34f92429397611ee5f01a75f25438f6 (patch) | |
| tree | 5121a80726efe360b98cbb36023ae2be352e86e8 /blocks.js | |
| parent | 0333925e916acc47c25cdcfec0c3be3d695a825f (diff) | |
| download | snap-byow-130e105ea34f92429397611ee5f01a75f25438f6.tar.gz snap-byow-130e105ea34f92429397611ee5f01a75f25438f6.zip | |
enable Zombiefication of JS-Functions
you can now redirect “this” in a JS function by binding it to another
sprite using the OF block
Diffstat (limited to 'blocks.js')
| -rw-r--r-- | blocks.js | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -155,7 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph, Costume*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2014-July-30'; +modules.blocks = '2014-August-13'; var SyntaxElementMorph; @@ -396,10 +396,11 @@ SyntaxElementMorph.prototype.allInputs = function () { SyntaxElementMorph.prototype.allEmptySlots = function () { /* answer empty input slots of all children excluding myself, - but omit those in nested rings (lambdas) + but omit those in nested rings (lambdas) and JS-Function primitives */ var empty = []; - if (!(this instanceof RingMorph)) { + if (!(this instanceof RingMorph) && + (this.selector !== 'reportJSFunction')) { this.children.forEach(function (morph) { if (morph.isEmptySlot && morph.isEmptySlot()) { empty.push(morph); |
