Browse Source

Use Smalltalk optOut: to treat jQuery as JS object

... instead of basicAt:put:
Herbert Vojčík 9 years ago
parent
commit
4a638c8e17
2 changed files with 6 additions and 5 deletions
  1. 5 4
      src/Web.js
  2. 1 1
      src/Web.st

+ 5 - 4
src/Web.js

@@ -3057,10 +3057,11 @@ selector: "initialize",
 protocol: 'initialization',
 fn: function (){
 var self=this;
+function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-$recv(jQuery)._basicAt_put_("allowJavaScriptCalls",true);
+$recv($Smalltalk())._optOut_(jQuery);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.HTMLCanvas.klass)});
@@ -3068,10 +3069,10 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "initialize\x0a\x09\x22Allow JS method calls for the jQuery object.\x0a\x09See boot.js DNU handling.\x22\x0a\x09\x0a\x09jQuery basicAt: 'allowJavaScriptCalls' put: true",
-referencedClasses: [],
+source: "initialize\x0a\x09\x22Allow JS method calls for the jQuery object.\x0a\x09See boot.js DNU handling.\x22\x0a\x09\x0a\x09Smalltalk optOut: jQuery",
+referencedClasses: ["Smalltalk"],
 //>>excludeEnd("ide");
-messageSends: ["basicAt:put:"]
+messageSends: ["optOut:"]
 }),
 $globals.HTMLCanvas.klass);
 

+ 1 - 1
src/Web.st

@@ -555,7 +555,7 @@ initialize
 	"Allow JS method calls for the jQuery object.
 	See boot.js DNU handling."
 	
-	jQuery basicAt: 'allowJavaScriptCalls' put: true
+	Smalltalk optOut: jQuery
 ! !
 
 !HTMLCanvas class methodsFor: 'instance creation'!