Ver código fonte

Merge pull request #59 from rcsimm/onunload_fix

Use at:put: instead of JSObjectProxy smart guess to set onunload
Herbert Vojčík 9 anos atrás
pai
commit
74f8d5979e
2 arquivos alterados com 4 adições e 4 exclusões
  1. 3 3
      src/Helios-Core.js
  2. 1 1
      src/Helios-Core.st

+ 3 - 3
src/Helios-Core.js

@@ -5451,7 +5451,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-$recv(parent)._onunload_((function(){
+$recv(parent)._at_put_("onunload",(function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
@@ -5468,10 +5468,10 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["parent"],
-source: "handleLossOfEnvironmentWithParent: parent\x0a\x09parent onunload: [ \x0a\x09\x09self removeBeforeUnloadMessage.\x0a\x09\x09window close ]",
+source: "handleLossOfEnvironmentWithParent: parent\x0a\x09parent at: 'onunload' put: [ \x0a\x09\x09self removeBeforeUnloadMessage.\x0a\x09\x09window close ]",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["onunload:", "removeBeforeUnloadMessage", "close"]
+messageSends: ["at:put:", "removeBeforeUnloadMessage", "close"]
 }),
 $globals.HLManager);
 

+ 1 - 1
src/Helios-Core.st

@@ -1278,7 +1278,7 @@ confirm: aString ifTrue: aBlock ifFalse: anotherBlock
 !
 
 handleLossOfEnvironmentWithParent: parent
-	parent onunload: [ 
+	parent at: 'onunload' put: [ 
 		self removeBeforeUnloadMessage.
 		window close ]
 !