extensions: further updated documentation

snap7
jmoenig 2021-08-03 00:05:16 +02:00
rodzic ac693b3f1f
commit 8965ec5487
3 zmienionych plików z 9 dodań i 2 usunięć

Wyświetl plik

@ -29,6 +29,9 @@
* German
* Chinese, thanks, Simon!
### 2021-08-03
* extensions: updated documentation
### 2021-08-02
* extensions: updated documentation

Wyświetl plik

@ -28,7 +28,7 @@
<script src="src/sketch.js?version=2021-07-05"></script>
<script src="src/video.js?version=2019-06-27"></script>
<script src="src/maps.js?version=2021-06-15"></script>
<script src="src/extensions.js?version=2021-08-02"></script>
<script src="src/extensions.js?version=2021-08-03"></script>
<script src="src/xml.js?version=2021-07-05"></script>
<script src="src/store.js?version=2021-08-01"></script>
<script src="src/locale.js?version=2021-07-12"></script>

Wyświetl plik

@ -33,7 +33,7 @@ Color, Process, contains*/
/*jshint esversion: 11*/
modules.extensions = '2021-August-2';
modules.extensions = '2021-August-3';
// Global stuff
@ -82,6 +82,8 @@ var SnapExtensions = {
function semantics
------------------
- functions are called by the "primitive" blocks with any arguments provided
- use the "function () {}" notation to define functions, not the ES6 arrow
notation, otherwise "this" will not get scoped correctly
- "this" refers to the current snap object (sprite or stage) at call-time
- a reference to the current process is always passed as last argument
@ -107,6 +109,8 @@ var SnapExtensions = {
function semantics
------------------
- use the "function () {}" notation to define functions, not the ES6 arrow
notation, otherwise "this" will not get scoped correctly
- "this" refers to the current input-slot at call-time (when the menu is
requested by the user by clicking on the down-arrow symbol)
- to get a handle on the current block use "this.parentThatIsA(BlockMorph)"