Browse Source

Refactor.

Herby Vojčík 4 years ago
parent
commit
58a04404fa
2 changed files with 8 additions and 8 deletions
  1. 6 6
      src/MiniMVP.js
  2. 2 2
      src/MiniMVP.st

+ 6 - 6
src/MiniMVP.js

@@ -85,17 +85,17 @@ selector: "hide",
 protocol: "private",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "hide\x0a\x09(self frame asDomNode at: 'style') at: #display put: 'none'",
+source: "hide\x0a\x09self frame asDomNode style setProperty: #display to: 'none'",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["at:put:", "at:", "asDomNode", "frame"]
+messageSends: ["setProperty:to:", "style", "asDomNode", "frame"]
 }, function ($methodClass){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-$recv($recv($recv($self._frame())._asDomNode())._at_("style"))._at_put_("display","none");
+$recv($recv($recv($self._frame())._asDomNode())._style())._setProperty_to_("display","none");
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"hide",{})});
@@ -166,17 +166,17 @@ selector: "show",
 protocol: "private",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "show\x0a\x09(self frame asDomNode at: 'style') removeProperty: 'display'",
+source: "show\x0a\x09self frame asDomNode style removeProperty: 'display'",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["removeProperty:", "at:", "asDomNode", "frame"]
+messageSends: ["removeProperty:", "style", "asDomNode", "frame"]
 }, function ($methodClass){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-$recv($recv($recv($self._frame())._asDomNode())._at_("style"))._removeProperty_("display");
+$recv($recv($recv($self._frame())._asDomNode())._style())._removeProperty_("display");
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"show",{})});

+ 2 - 2
src/MiniMVP.st

@@ -36,11 +36,11 @@ refresh
 !MiniPresenter methodsFor: 'private'!
 
 hide
-	(self frame asDomNode at: 'style') at: #display put: 'none'
+	self frame asDomNode style setProperty: #display to: 'none'
 !
 
 show
-	(self frame asDomNode at: 'style') removeProperty: 'display'
+	self frame asDomNode style removeProperty: 'display'
 ! !
 
 !MiniPresenter class methodsFor: 'instance creation'!