Bladeren bron

`with: {'id'->'foo'. 'Hello, world!'}` now available

Herbert Vojčík 9 jaren geleden
bovenliggende
commit
488b796169
2 gewijzigde bestanden met toevoegingen van 68 en 0 verwijderingen
  1. 56 0
      src/Web.js
  2. 12 0
      src/Web.st

+ 56 - 0
src/Web.js

@@ -5186,6 +5186,30 @@ messageSends: []
 }),
 $globals.Widget.klass);
 
+$core.addMethod(
+$core.method({
+selector: "appendToBrush:",
+protocol: '*Web',
+fn: function (aTagBrush){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv(aTagBrush)._at_put_(self._key(),self._value());
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},$globals.Association)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aTagBrush"],
+source: "appendToBrush: aTagBrush\x0a\x09aTagBrush at: self key put: self value",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["at:put:", "key", "value"]
+}),
+$globals.Association);
+
 $core.addMethod(
 $core.method({
 selector: "appendToBrush:",
@@ -5261,6 +5285,38 @@ messageSends: ["snippetAt:", "current", "asString"]
 }),
 $globals.CharacterArray);
 
+$core.addMethod(
+$core.method({
+selector: "appendToBrush:",
+protocol: '*Web',
+fn: function (aTagBrush){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+self._do_((function(each){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return $recv(aTagBrush)._append_(each);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},$globals.Collection)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aTagBrush"],
+source: "appendToBrush: aTagBrush\x0a\x09self do: [ :each | aTagBrush append: each ]",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["do:", "append:"]
+}),
+$globals.Collection);
+
 $core.addMethod(
 $core.method({
 selector: "appendToBrush:",

+ 12 - 0
src/Web.st

@@ -1051,6 +1051,12 @@ classTag
 	^ 'widget'
 ! !
 
+!Association methodsFor: '*Web'!
+
+appendToBrush: aTagBrush
+	aTagBrush at: self key put: self value
+! !
+
 !BlockClosure methodsFor: '*Web'!
 
 appendToBrush: aTagBrush
@@ -1067,6 +1073,12 @@ asSnippet
 	^ HTMLSnippet current snippetAt: self asString
 ! !
 
+!Collection methodsFor: '*Web'!
+
+appendToBrush: aTagBrush
+	self do: [ :each | aTagBrush append: each ]
+! !
+
 !Object methodsFor: '*Web'!
 
 appendToBrush: aTagBrush