kopia lustrzana https://github.com/backface/turtlestitch
Merge branch 'master' into scenes
commit
a5937b460f
31
HISTORY.md
31
HISTORY.md
|
@ -92,6 +92,37 @@
|
|||
|
||||
## in development:
|
||||
|
||||
* **Notable Changes:**
|
||||
* JS-functions are now disabled by default until switched on in the settings menu per session
|
||||
* error messages in presentation mode are now shown as pop-up messages onstage
|
||||
* **Notable Fixes:**
|
||||
* register unsaved changes when the user edits a comment
|
||||
* fixed bignums library and and made colors library faster, thanks, Brian!
|
||||
* fixed setting the IDE language via a url parameter, thanks, Joan!
|
||||
* **Translation Updates:**
|
||||
* Polish, thanks, Witek!
|
||||
* new Hindi translation, thanks, Barthdry!
|
||||
* German
|
||||
|
||||
### 2021-06-11
|
||||
* byob, blocks: catch JS functions inside custom dropdown definitions
|
||||
* German translation update
|
||||
|
||||
### 2021-06-10
|
||||
* threads: error messages in presentation mode are now shown as pop-up messages onstage
|
||||
* store: commented out modal prompt to enable JS when loading a project that uses it
|
||||
* gui: renamed setting to "JavaScript extensions"
|
||||
|
||||
### 2021-06-09
|
||||
* new dev version
|
||||
* Polish translation update, thanks, Witek!
|
||||
* blocks: register unsaved changes when the user edits a comment
|
||||
* new Hindi translation, thanks, Barthdry!
|
||||
* fixed bignums library and and made colors library faster, thanks, Brian!
|
||||
* gui: fixed setting the IDE language via a url parameter, thanks, Joan!
|
||||
* threads, gui, objects, byob, store: reinstated JS-function control, disabled JS-functions by default
|
||||
* gui, store: automatically logout when the user enablesJavaScript, commented out for now
|
||||
|
||||
## 6.8.1
|
||||
* **Notable Fixes:**
|
||||
* fixed peeling off niladic custom block instances from prototype templates
|
||||
|
|
Plik binarny nie jest wyświetlany.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -185,7 +185,7 @@ SnapTranslator.dict.de = {
|
|||
'translator_e-mail':
|
||||
'jens@moenig.org, jadga.huegle@sap.com', // optional
|
||||
'last_changed':
|
||||
'2021-03-05', // this, too, will appear in the Translators tab
|
||||
'2021-06-11', // this, too, will appear in the Translators tab
|
||||
|
||||
// GUI
|
||||
// control bar:
|
||||
|
@ -1075,6 +1075,14 @@ SnapTranslator.dict.de = {
|
|||
'check to enable\nvirtual keyboard support\nfor mobile devices':
|
||||
'einschalten um die virtuelle\nTastatur auf mobilen Ger\u00e4ten\n'
|
||||
+ 'zu erm\u00f6glichen',
|
||||
'JavaScript extensions':
|
||||
'JavaScript Erweiterungen',
|
||||
'check to support\nnative JavaScript functions':
|
||||
'einschalten um JavaScript-Funktionen\ndirekt in Snap! zu ermöglichen',
|
||||
'uncheck to disable support for\nnative JavaScript functions':
|
||||
'ausschalten, um potentiell gefährliche\nJavaScript-Funktionen zu verhindern',
|
||||
'JavaScript extensions for Snap!\nare turned off':
|
||||
'JavaScript Erweiterungen für Snap!\nsind ausgeschaltet',
|
||||
'Input sliders':
|
||||
'Eingabeschieber',
|
||||
'uncheck to disable\ninput sliders for\nentry fields':
|
||||
|
|
Plik diff jest za duży
Load Diff
Plik diff jest za duży
Load Diff
16
snap.html
16
snap.html
|
@ -8,21 +8,21 @@
|
|||
<script src="src/morphic.js?version=2021-04-12"></script>
|
||||
<script src="src/symbols.js?version=2021-03-03"></script>
|
||||
<script src="src/widgets.js?version=2021-01-05"></script>
|
||||
<script src="src/blocks.js?version=2021-05-21"></script>
|
||||
<script src="src/threads.js?version=2021-04-17"></script>
|
||||
<script src="src/objects.js?version=2021-04-23"></script>
|
||||
<script src="src/blocks.js?version=2021-06-11"></script>
|
||||
<script src="src/threads.js?version=2021-06-10"></script>
|
||||
<script src="src/objects.js?version=2021-06-09"></script>
|
||||
<script src="src/scenes.js?version=2021-05-21"></script>
|
||||
<script src="src/gui.js?version=2021-05-21"></script>
|
||||
<script src="src/paint.js?version=2021-03-17"></script>
|
||||
<script src="src/gui.js?version=2021-06-10"></script>
|
||||
<script src="src/paint.js?version=2020-05-17"></script>
|
||||
<script src="src/lists.js?version=2021-03-15"></script>
|
||||
<script src="src/byob.js?version=2021-05-04"></script>
|
||||
<script src="src/byob.js?version=2021-06-11"></script>
|
||||
<script src="src/tables.js?version=2021-03-05"></script>
|
||||
<script src="src/sketch.js?version=2021-03-17"></script>
|
||||
<script src="src/video.js?version=2019-06-27"></script>
|
||||
<script src="src/maps.js?version=2020-03-25"></script>
|
||||
<script src="src/xml.js?version=2020-04-27"></script>
|
||||
<script src="src/store.js?version=2021-05-21"></script>
|
||||
<script src="src/locale.js?version=2021-03-15"></script>
|
||||
<script src="src/store.js?version=2021-06-10"></script>
|
||||
<script src="src/locale.js?version=2021-06-11"></script>
|
||||
<script src="src/cloud.js?version=2021-02-04"></script>
|
||||
<script src="src/api.js?version=2021-01-25"></script>
|
||||
<script src="src/sha512.js?version=2019-06-27"></script>
|
||||
|
|
|
@ -158,7 +158,7 @@ CustomCommandBlockMorph, SymbolMorph, ToggleButtonMorph, DialMorph*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.blocks = '2021-May-21';
|
||||
modules.blocks = '2021-June-11';
|
||||
|
||||
var SyntaxElementMorph;
|
||||
var BlockMorph;
|
||||
|
@ -9105,6 +9105,10 @@ InputSlotMorph.prototype.menuFromDict = function (
|
|||
}
|
||||
|
||||
if (choices instanceof Function) {
|
||||
if (!Process.prototype.enableJS) {
|
||||
menu.addItem('JavaScript extensions for Snap!\nare turned off');
|
||||
return menu;
|
||||
}
|
||||
choices = choices.call(this);
|
||||
} else if (isString(choices)) {
|
||||
choices = this[choices]();
|
||||
|
@ -13180,9 +13184,13 @@ CommentMorph.prototype.mouseClickLeft = function () {
|
|||
|
||||
CommentMorph.prototype.layoutChanged = function () {
|
||||
// react to a change of the contents area
|
||||
var ide = this.parentThatIsA(IDE_Morph);
|
||||
this.fixLayout();
|
||||
this.align();
|
||||
this.comeToFront();
|
||||
if (ide) {
|
||||
ide.recordUnsavedChanges();
|
||||
}
|
||||
};
|
||||
|
||||
CommentMorph.prototype.fixLayout = function () {
|
||||
|
|
10
src/byob.js
10
src/byob.js
|
@ -106,7 +106,7 @@ WatcherMorph, XML_Serializer, SnapTranslator*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.byob = '2021-May-04';
|
||||
modules.byob = '2021-June-11';
|
||||
|
||||
// Declarations
|
||||
|
||||
|
@ -347,9 +347,11 @@ CustomBlockDefinition.prototype.parseChoices = function (string) {
|
|||
if (string.match(/^function\s*\(.*\)\s*{.*\n/)) {
|
||||
// It's a JS function definition.
|
||||
// Let's extract its params and body, and return a Function out of them.
|
||||
// if (!this.enableJS) {
|
||||
// throw new Error('JavaScript is not enabled');
|
||||
// }
|
||||
/*
|
||||
if (!Process.prototype.enableJS) {
|
||||
throw new Error('JavaScript is not enabled');
|
||||
}
|
||||
*/
|
||||
params = string.match(/^function\s*\((.*)\)/)[1].split(',');
|
||||
body = string.split('\n').slice(1,-1).join('\n');
|
||||
return Function.apply(null, params.concat([body]));
|
||||
|
|
91
src/gui.js
91
src/gui.js
|
@ -83,7 +83,7 @@ Animation, BoxMorph, BlockDialogMorph, Project, ZERO, BLACK*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.gui = '2021-May-21';
|
||||
modules.gui = '2021-June-10';
|
||||
|
||||
// Declarations
|
||||
|
||||
|
@ -301,7 +301,7 @@ IDE_Morph.prototype.init = function (isAutoFill) {
|
|||
};
|
||||
|
||||
IDE_Morph.prototype.openIn = function (world) {
|
||||
var hash, myself = this, urlLanguage = null;
|
||||
var hash, myself = this;
|
||||
|
||||
function initUser(username) {
|
||||
sessionStorage.username = username;
|
||||
|
@ -379,9 +379,6 @@ IDE_Morph.prototype.openIn = function (world) {
|
|||
if (dict.noExitWarning) {
|
||||
window.onbeforeunload = nop;
|
||||
}
|
||||
if (dict.lang) {
|
||||
myself.setLanguage(dict.lang, null, true); // don't persist
|
||||
}
|
||||
|
||||
// only force my world to get focus if I'm not in embed mode
|
||||
// to prevent the iFrame from involuntarily scrolling into view
|
||||
|
@ -475,26 +472,47 @@ IDE_Morph.prototype.openIn = function (world) {
|
|||
}
|
||||
);
|
||||
}
|
||||
} else if (location.hash.substr(0, 5) === '#run:') {
|
||||
} else if (location.hash.substr(0, 5) === '#run:') {
|
||||
dict = '';
|
||||
hash = location.hash.substr(5);
|
||||
idx = hash.indexOf("&");
|
||||
if (idx > 0) {
|
||||
hash = hash.slice(0, idx);
|
||||
}
|
||||
|
||||
//decoding if hash is an encoded URI
|
||||
if (hash.charAt(0) === '%'
|
||||
|| hash.search(/\%(?:[0-9a-f]{2})/i) > -1) {
|
||||
hash = decodeURIComponent(hash);
|
||||
}
|
||||
if (hash.substr(0, 8) === '<project>') {
|
||||
this.rawOpenProjectString(hash);
|
||||
applyFlags(myself.cloud.parseDict(location.hash.substr(5)));
|
||||
idx = hash.indexOf("&");
|
||||
|
||||
// supporting three URL cases
|
||||
|
||||
// xml project
|
||||
if (hash.substr(0, 8) === '<project') {
|
||||
this.rawOpenProjectString(
|
||||
hash.slice(0,hash.indexOf('</project>') + 10)
|
||||
);
|
||||
applyFlags(
|
||||
myself.cloud.parseDict(
|
||||
hash.substr(hash.indexOf('</project>') + 10)
|
||||
)
|
||||
);
|
||||
// no project, only flags
|
||||
} else if (idx == 0){
|
||||
applyFlags(myself.cloud.parseDict(hash));
|
||||
// xml file path
|
||||
// three path types allowed:
|
||||
// (1) absolute (http...),
|
||||
// (2) relative to site ("/path") or
|
||||
// (3) relative to folder ("path")
|
||||
} else {
|
||||
this.shield = new Morph();
|
||||
this.shield.alpha = 0;
|
||||
this.shield.setExtent(this.parent.extent());
|
||||
this.parent.add(this.shield);
|
||||
this.showMessage('Fetching project...');
|
||||
|
||||
if (idx > 0) {
|
||||
dict = myself.cloud.parseDict(hash.substr(idx));
|
||||
hash = hash.slice(0,idx);
|
||||
}
|
||||
this.getURL(
|
||||
hash,
|
||||
projectData => {
|
||||
|
@ -516,11 +534,7 @@ IDE_Morph.prototype.openIn = function (world) {
|
|||
this.shield = null;
|
||||
msg.destroy();
|
||||
// this.toggleAppMode(true);
|
||||
applyFlags(
|
||||
this.cloud.parseDict(
|
||||
location.hash.substr(5)
|
||||
)
|
||||
);
|
||||
applyFlags(dict);
|
||||
}
|
||||
]);
|
||||
}
|
||||
|
@ -621,16 +635,33 @@ IDE_Morph.prototype.openIn = function (world) {
|
|||
this.cloudError()
|
||||
);
|
||||
} else if (location.hash.substr(0, 6) === '#lang:') {
|
||||
urlLanguage = location.hash.substr(6);
|
||||
this.setLanguage(urlLanguage, null, true); // don't persist
|
||||
this.loadNewProject = true;
|
||||
dict = myself.cloud.parseDict(location.hash.substr(6));
|
||||
applyFlags(dict);
|
||||
} else if (location.hash.substr(0, 7) === '#signup') {
|
||||
this.createCloudAccount();
|
||||
}
|
||||
this.loadNewProject = false;
|
||||
}
|
||||
|
||||
if (this.userLanguage) {
|
||||
function launcherLangSetting() {
|
||||
var langSetting = null;
|
||||
if (location.hash.substr(0, 6) === '#lang:') {
|
||||
if (location.hash.charAt(8) === '_') {
|
||||
langSetting = location.hash.slice(6,11);
|
||||
} else {
|
||||
langSetting = location.hash.slice(6,8);
|
||||
}
|
||||
}
|
||||
// lang-flag wins lang-anchor setting
|
||||
langSetting = myself.cloud.parseDict(location.hash).lang || langSetting;
|
||||
return langSetting;
|
||||
}
|
||||
|
||||
if (launcherLangSetting()) {
|
||||
// launch with this non-persisten lang setting
|
||||
this.loadNewProject = true;
|
||||
this.setLanguage(launcherLangSetting(), interpretUrlAnchors, true);
|
||||
} else if (this.userLanguage) {
|
||||
this.loadNewProject = true;
|
||||
this.setLanguage(this.userLanguage, interpretUrlAnchors);
|
||||
} else {
|
||||
|
@ -3569,10 +3600,14 @@ IDE_Morph.prototype.settingsMenu = function () {
|
|||
'microphoneMenu'
|
||||
);
|
||||
menu.addLine();
|
||||
/*
|
||||
addPreference(
|
||||
'JavaScript',
|
||||
'JavaScript extensions',
|
||||
() => {
|
||||
/*
|
||||
if (!Process.prototype.enableJS) {
|
||||
this.logout();
|
||||
}
|
||||
*/
|
||||
Process.prototype.enableJS = !Process.prototype.enableJS;
|
||||
this.currentSprite.blocksCache.operators = null;
|
||||
this.currentSprite.paletteCache.operators = null;
|
||||
|
@ -3580,9 +3615,11 @@ IDE_Morph.prototype.settingsMenu = function () {
|
|||
},
|
||||
Process.prototype.enableJS,
|
||||
'uncheck to disable support for\nnative JavaScript functions',
|
||||
'check to support\nnative JavaScript functions'
|
||||
'check to support\nnative JavaScript functions' /* +
|
||||
'.\n' +
|
||||
'NOTE: You will have to manually\n' +
|
||||
'sign in again to access your account.' */
|
||||
);
|
||||
*/
|
||||
addPreference(
|
||||
'Add scenes',
|
||||
() => this.isAddingScenes = !this.isAddingScenes,
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
/*global modules, contains*/
|
||||
|
||||
modules.locale = '2021-March-15';
|
||||
modules.locale = '2021-June-11';
|
||||
|
||||
// Global stuff
|
||||
|
||||
|
@ -168,7 +168,7 @@ SnapTranslator.dict.de = {
|
|||
'translator_e-mail':
|
||||
'jens@moenig.org, jadga.huegle@sap.com',
|
||||
'last_changed':
|
||||
'2021-03-05'
|
||||
'2021-06-11'
|
||||
};
|
||||
|
||||
SnapTranslator.dict.it = {
|
||||
|
@ -318,11 +318,11 @@ SnapTranslator.dict.pl = {
|
|||
'language_name':
|
||||
'Polski',
|
||||
'language_translator':
|
||||
'Witek Kranas & deKrain',
|
||||
'Witek Kranas & deKrain & Andrzej Batorski',
|
||||
'translator_e-mail':
|
||||
'witek@oeiizk.waw.pl',
|
||||
'last_changed':
|
||||
'2017-11-09'
|
||||
'2021-05-15'
|
||||
};
|
||||
|
||||
SnapTranslator.dict.zh_TW = {
|
||||
|
@ -632,3 +632,13 @@ SnapTranslator.dict.he = {
|
|||
'last_changed':
|
||||
'2020-04-21'
|
||||
};
|
||||
SnapTranslator.dict.hi = {
|
||||
'language_name':
|
||||
'हिंदी',
|
||||
'language_translator':
|
||||
'Barthdry',
|
||||
'translator_e-mail':
|
||||
'barathkumarbasker2007@gmail.com',
|
||||
'last_changed':
|
||||
'2021-05-08'
|
||||
};
|
||||
|
|
|
@ -1289,7 +1289,7 @@
|
|||
|
||||
/*global window, HTMLCanvasElement, FileReader, Audio, FileList, Map*/
|
||||
|
||||
var morphicVersion = '2021-Aril-12';
|
||||
var morphicVersion = '2021-June-09';
|
||||
var modules = {}; // keep track of additional loaded modules
|
||||
var useBlurredShadows = true;
|
||||
|
||||
|
@ -8414,7 +8414,7 @@ MenuMorph.prototype.destroy = function () {
|
|||
if (this.hasFocus) {
|
||||
this.world.keyboardFocus = null;
|
||||
}
|
||||
if (!this.isListContents) {
|
||||
if (!this.isListContents && (this.world.activeMenu === this)) {
|
||||
this.world.activeMenu = null;
|
||||
}
|
||||
MenuMorph.uber.destroy.call(this);
|
||||
|
|
|
@ -84,7 +84,7 @@ BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, BooleanSlotMorph,
|
|||
localize, TableMorph, TableFrameMorph, normalizeCanvas, VectorPaintEditorMorph,
|
||||
AlignmentMorph, Process, WorldMap, copyCanvas, useBlurredShadows*/
|
||||
|
||||
modules.objects = '2021-April-23';
|
||||
modules.objects = '2021-June-09';
|
||||
|
||||
var SpriteMorph;
|
||||
var StageMorph;
|
||||
|
@ -2679,7 +2679,7 @@ SpriteMorph.prototype.blockTemplates = function (category) {
|
|||
blocks.push(block('reportIsA'));
|
||||
blocks.push(block('reportIsIdentical'));
|
||||
|
||||
if (true) { // (Process.prototype.enableJS) {
|
||||
if (Process.prototype.enableJS) {
|
||||
blocks.push('-');
|
||||
blocks.push(block('reportJSFunction'));
|
||||
if (Process.prototype.enableCompiling) {
|
||||
|
@ -8869,7 +8869,7 @@ StageMorph.prototype.blockTemplates = function (category) {
|
|||
blocks.push(block('reportIsA'));
|
||||
blocks.push(block('reportIsIdentical'));
|
||||
|
||||
if (true) { // (Process.prototype.enableJS) {
|
||||
if (Process.prototype.enableJS) {
|
||||
blocks.push('-');
|
||||
blocks.push(block('reportJSFunction'));
|
||||
if (Process.prototype.enableCompiling) {
|
||||
|
|
24
src/store.js
24
src/store.js
|
@ -61,8 +61,7 @@ Project*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.store = '2021-May-21';
|
||||
|
||||
modules.store = '2021-June-10';
|
||||
|
||||
// XML_Serializer ///////////////////////////////////////////////////////
|
||||
/*
|
||||
|
@ -1175,17 +1174,17 @@ SnapSerializer.prototype.loadBlock = function (model, isReporter, object) {
|
|||
model.attributes['var']
|
||||
);
|
||||
} else {
|
||||
/*
|
||||
// disable JavaScript functions, commented out for now
|
||||
if (model.attributes.s === 'reportJSFunction' &&
|
||||
!Process.prototype.enableJS) {
|
||||
if (window.confirm('enable JavaScript?')) {
|
||||
Process.prototype.enableJS = true;
|
||||
} else {
|
||||
throw new Error('JavaScript is not enabled');
|
||||
// disable loading JavaScript functions
|
||||
/*
|
||||
if (model.attributes.s === 'reportJSFunction' &&
|
||||
!Process.prototype.enableJS) {
|
||||
if (window.confirm('enable JavaScript?')) {
|
||||
Process.prototype.enableJS = true;
|
||||
} else {
|
||||
throw new Error('JavaScript is not enabled');
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
*/
|
||||
block = SpriteMorph.prototype.blockForSelector(model.attributes.s);
|
||||
migration = SpriteMorph.prototype.blockMigrations[
|
||||
model.attributes.s
|
||||
|
@ -1308,7 +1307,6 @@ SnapSerializer.prototype.loadInput = function (model, input, block, object) {
|
|||
});
|
||||
input.fixLayout();
|
||||
} else if (model.tag === 'block' || model.tag === 'custom-block') {
|
||||
// block.silentReplaceInput(input, this.loadBlock(model, true, object));
|
||||
block.replaceInput(input, this.loadBlock(model, true, object));
|
||||
} else if (model.tag === 'color') {
|
||||
input.setColor(this.loadColor(model.contents));
|
||||
|
|
|
@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy, Map,
|
|||
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, BLACK,
|
||||
TableFrameMorph, ColorSlotMorph, isSnapObject, newCanvas, Symbol, SVG_Costume*/
|
||||
|
||||
modules.threads = '2021-April-17';
|
||||
modules.threads = '2021-June-10';
|
||||
|
||||
var ThreadManager;
|
||||
var Process;
|
||||
|
@ -562,7 +562,7 @@ Process.prototype.enableLiveCoding = false; // experimental
|
|||
Process.prototype.enableSingleStepping = false; // experimental
|
||||
Process.prototype.enableCompiling = false; // experimental
|
||||
Process.prototype.flashTime = 0; // experimental
|
||||
// Process.prototype.enableJS = false;
|
||||
Process.prototype.enableJS = false;
|
||||
|
||||
function Process(topBlock, receiver, onComplete, yieldFirst) {
|
||||
this.topBlock = topBlock || null;
|
||||
|
@ -1106,19 +1106,24 @@ Process.prototype.expectReport = function () {
|
|||
// Process Exception Handling
|
||||
|
||||
Process.prototype.handleError = function (error, element) {
|
||||
var m = element;
|
||||
var m = element,
|
||||
ide = this.homeContext.receiver.parentThatIsA(IDE_Morph);
|
||||
this.stop();
|
||||
this.errorFlag = true;
|
||||
this.topBlock.addErrorHighlight();
|
||||
if (isNil(m) || isNil(m.world())) {m = this.topBlock; }
|
||||
m.showBubble(
|
||||
(m === element ? '' : 'Inside: ')
|
||||
+ error.name
|
||||
+ '\n'
|
||||
+ error.message,
|
||||
this.exportResult,
|
||||
this.receiver
|
||||
);
|
||||
if (ide.isAppMode) {
|
||||
ide.showMessage(error.name + '\n' + error.message);
|
||||
} else {
|
||||
if (isNil(m) || isNil(m.world())) {m = this.topBlock; }
|
||||
m.showBubble(
|
||||
(m === element ? '' : 'Inside: ')
|
||||
+ error.name
|
||||
+ '\n'
|
||||
+ error.message,
|
||||
this.exportResult,
|
||||
this.receiver
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
Process.prototype.errorObsolete = function () {
|
||||
|
@ -1204,9 +1209,9 @@ Process.prototype.evaluate = function (
|
|||
return this.returnValueToParentContext(null);
|
||||
}
|
||||
if (context instanceof Function) {
|
||||
// if (!this.enableJS) {
|
||||
// throw new Error('JavaScript is not enabled');
|
||||
// }
|
||||
if (!this.enableJS) {
|
||||
throw new Error('JavaScript extensions for Snap!\nare turned off');
|
||||
}
|
||||
return context.apply(
|
||||
this.blockReceiver(),
|
||||
args.itemsArray().concat([this])
|
||||
|
|
Ładowanie…
Reference in New Issue