1
0

Canvas.js 112 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028
  1. define("amber_core/Canvas", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_core/Kernel-Objects", "amber_core/Kernel-Infrastructure", "amber_core/Kernel-Methods", "amber_core/Kernel-Collections"], function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Canvas');
  3. smalltalk.packages["Canvas"].transport = {"type":"amd","amdNamespace":"amber_core"};
  4. smalltalk.addClass('BrowserInterface', smalltalk.Object, [], 'Canvas');
  5. smalltalk.BrowserInterface.comment="I am platform interface class that tries to use window and jQuery; that is, one for browser environment.\x0a\x0a## API\x0a\x0a self isAvailable. \x22true if window and jQuery exist\x22.\x0a\x0a self alert: 'Hey, there is a problem'.\x0a self confirm: 'Affirmative?'.\x0a self prompt: 'Your name:'.\x0a\x0a self ajax: #{\x0a 'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'\x0a }.";
  6. smalltalk.addMethod(
  7. smalltalk.method({
  8. selector: "ajax:",
  9. category: 'actions',
  10. fn: function (anObject){
  11. var self=this;
  12. return smalltalk.withContext(function($ctx1) {
  13. var $1;
  14. $1=_st(jQuery)._ajax_(anObject);
  15. return $1;
  16. }, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},smalltalk.BrowserInterface)})},
  17. args: ["anObject"],
  18. source: "ajax: anObject\x0a\x09^jQuery ajax: anObject",
  19. messageSends: ["ajax:"],
  20. referencedClasses: []
  21. }),
  22. smalltalk.BrowserInterface);
  23. smalltalk.addMethod(
  24. smalltalk.method({
  25. selector: "alert:",
  26. category: 'actions',
  27. fn: function (aString){
  28. var self=this;
  29. return smalltalk.withContext(function($ctx1) {
  30. var $1;
  31. $1=_st(window)._alert_(aString);
  32. return $1;
  33. }, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.BrowserInterface)})},
  34. args: ["aString"],
  35. source: "alert: aString\x0a\x09^window alert: aString",
  36. messageSends: ["alert:"],
  37. referencedClasses: []
  38. }),
  39. smalltalk.BrowserInterface);
  40. smalltalk.addMethod(
  41. smalltalk.method({
  42. selector: "confirm:",
  43. category: 'actions',
  44. fn: function (aString){
  45. var self=this;
  46. return smalltalk.withContext(function($ctx1) {
  47. var $1;
  48. $1=_st(window)._confirm_(aString);
  49. return $1;
  50. }, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},smalltalk.BrowserInterface)})},
  51. args: ["aString"],
  52. source: "confirm: aString\x0a\x09^window confirm: aString",
  53. messageSends: ["confirm:"],
  54. referencedClasses: []
  55. }),
  56. smalltalk.BrowserInterface);
  57. smalltalk.addMethod(
  58. smalltalk.method({
  59. selector: "isAvailable",
  60. category: 'testing',
  61. fn: function (){
  62. var self=this;
  63. return smalltalk.withContext(function($ctx1) {
  64. return typeof window !== "undefined" && typeof jQuery !== "undefined";
  65. return self}, function($ctx1) {$ctx1.fill(self,"isAvailable",{},smalltalk.BrowserInterface)})},
  66. args: [],
  67. source: "isAvailable\x0a<return typeof window !== \x22undefined\x22 && typeof jQuery !== \x22undefined\x22>",
  68. messageSends: [],
  69. referencedClasses: []
  70. }),
  71. smalltalk.BrowserInterface);
  72. smalltalk.addMethod(
  73. smalltalk.method({
  74. selector: "prompt:",
  75. category: 'actions',
  76. fn: function (aString){
  77. var self=this;
  78. return smalltalk.withContext(function($ctx1) {
  79. var $1;
  80. $1=_st(window)._prompt_(aString);
  81. return $1;
  82. }, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},smalltalk.BrowserInterface)})},
  83. args: ["aString"],
  84. source: "prompt: aString\x0a\x09^window prompt: aString",
  85. messageSends: ["prompt:"],
  86. referencedClasses: []
  87. }),
  88. smalltalk.BrowserInterface);
  89. smalltalk.BrowserInterface.klass.iVarNames = ['uiWorker','ajaxWorker'];
  90. smalltalk.addClass('HTMLCanvas', smalltalk.Object, ['root'], 'Canvas');
  91. smalltalk.HTMLCanvas.comment="I am a canvas for building HTML.\x0a\x0aI provide the `#tag:` method to create a `TagBrush` (wrapping a DOM element) and convenience methods in the `tags` protocol.\x0a\x0a## API\x0a\x0aMy instances are used as the argument of the `#renderOn:` method of `Widget` objects.\x0a\x0aThe `#with:` method is used to compose HTML, nesting tags. `#with:` can take a `TagBrush`, a `String`, a `BlockClosure` or a `Widget` as argument.\x0a\x0a## Usage example:\x0a\x0a aCanvas a \x0a with: [ aCanvas span with: 'click me' ];\x0a onClick: [ window alert: 'clicked!' ]";
  92. smalltalk.addMethod(
  93. smalltalk.method({
  94. selector: "a",
  95. category: 'tags',
  96. fn: function (){
  97. var self=this;
  98. return smalltalk.withContext(function($ctx1) {
  99. var $1;
  100. $1=self._tag_("a");
  101. return $1;
  102. }, function($ctx1) {$ctx1.fill(self,"a",{},smalltalk.HTMLCanvas)})},
  103. args: [],
  104. source: "a\x0a\x09^self tag: 'a'",
  105. messageSends: ["tag:"],
  106. referencedClasses: []
  107. }),
  108. smalltalk.HTMLCanvas);
  109. smalltalk.addMethod(
  110. smalltalk.method({
  111. selector: "abbr",
  112. category: 'tags',
  113. fn: function (){
  114. var self=this;
  115. return smalltalk.withContext(function($ctx1) {
  116. var $1;
  117. $1=self._tag_("abbr");
  118. return $1;
  119. }, function($ctx1) {$ctx1.fill(self,"abbr",{},smalltalk.HTMLCanvas)})},
  120. args: [],
  121. source: "abbr\x0a\x09^self tag: 'abbr'",
  122. messageSends: ["tag:"],
  123. referencedClasses: []
  124. }),
  125. smalltalk.HTMLCanvas);
  126. smalltalk.addMethod(
  127. smalltalk.method({
  128. selector: "address",
  129. category: 'tags',
  130. fn: function (){
  131. var self=this;
  132. return smalltalk.withContext(function($ctx1) {
  133. var $1;
  134. $1=self._tag_("address");
  135. return $1;
  136. }, function($ctx1) {$ctx1.fill(self,"address",{},smalltalk.HTMLCanvas)})},
  137. args: [],
  138. source: "address\x0a\x09^self tag: 'address'",
  139. messageSends: ["tag:"],
  140. referencedClasses: []
  141. }),
  142. smalltalk.HTMLCanvas);
  143. smalltalk.addMethod(
  144. smalltalk.method({
  145. selector: "area",
  146. category: 'tags',
  147. fn: function (){
  148. var self=this;
  149. return smalltalk.withContext(function($ctx1) {
  150. var $1;
  151. $1=self._tag_("area");
  152. return $1;
  153. }, function($ctx1) {$ctx1.fill(self,"area",{},smalltalk.HTMLCanvas)})},
  154. args: [],
  155. source: "area\x0a\x09^self tag: 'area'",
  156. messageSends: ["tag:"],
  157. referencedClasses: []
  158. }),
  159. smalltalk.HTMLCanvas);
  160. smalltalk.addMethod(
  161. smalltalk.method({
  162. selector: "article",
  163. category: 'tags',
  164. fn: function (){
  165. var self=this;
  166. return smalltalk.withContext(function($ctx1) {
  167. var $1;
  168. $1=self._tag_("article");
  169. return $1;
  170. }, function($ctx1) {$ctx1.fill(self,"article",{},smalltalk.HTMLCanvas)})},
  171. args: [],
  172. source: "article\x0a\x09^self tag: 'article'",
  173. messageSends: ["tag:"],
  174. referencedClasses: []
  175. }),
  176. smalltalk.HTMLCanvas);
  177. smalltalk.addMethod(
  178. smalltalk.method({
  179. selector: "aside",
  180. category: 'tags',
  181. fn: function (){
  182. var self=this;
  183. return smalltalk.withContext(function($ctx1) {
  184. var $1;
  185. $1=self._tag_("aside");
  186. return $1;
  187. }, function($ctx1) {$ctx1.fill(self,"aside",{},smalltalk.HTMLCanvas)})},
  188. args: [],
  189. source: "aside\x0a\x09^self tag: 'aside'",
  190. messageSends: ["tag:"],
  191. referencedClasses: []
  192. }),
  193. smalltalk.HTMLCanvas);
  194. smalltalk.addMethod(
  195. smalltalk.method({
  196. selector: "audio",
  197. category: 'tags',
  198. fn: function (){
  199. var self=this;
  200. return smalltalk.withContext(function($ctx1) {
  201. var $1;
  202. $1=self._tag_("audio");
  203. return $1;
  204. }, function($ctx1) {$ctx1.fill(self,"audio",{},smalltalk.HTMLCanvas)})},
  205. args: [],
  206. source: "audio\x0a\x09^self tag: 'audio'",
  207. messageSends: ["tag:"],
  208. referencedClasses: []
  209. }),
  210. smalltalk.HTMLCanvas);
  211. smalltalk.addMethod(
  212. smalltalk.method({
  213. selector: "base",
  214. category: 'tags',
  215. fn: function (){
  216. var self=this;
  217. return smalltalk.withContext(function($ctx1) {
  218. var $1;
  219. $1=self._tag_("base");
  220. return $1;
  221. }, function($ctx1) {$ctx1.fill(self,"base",{},smalltalk.HTMLCanvas)})},
  222. args: [],
  223. source: "base\x0a\x09^self tag: 'base'",
  224. messageSends: ["tag:"],
  225. referencedClasses: []
  226. }),
  227. smalltalk.HTMLCanvas);
  228. smalltalk.addMethod(
  229. smalltalk.method({
  230. selector: "blockquote",
  231. category: 'tags',
  232. fn: function (){
  233. var self=this;
  234. return smalltalk.withContext(function($ctx1) {
  235. var $1;
  236. $1=self._tag_("blockquote");
  237. return $1;
  238. }, function($ctx1) {$ctx1.fill(self,"blockquote",{},smalltalk.HTMLCanvas)})},
  239. args: [],
  240. source: "blockquote\x0a\x09^self tag: 'blockquote'",
  241. messageSends: ["tag:"],
  242. referencedClasses: []
  243. }),
  244. smalltalk.HTMLCanvas);
  245. smalltalk.addMethod(
  246. smalltalk.method({
  247. selector: "body",
  248. category: 'tags',
  249. fn: function (){
  250. var self=this;
  251. return smalltalk.withContext(function($ctx1) {
  252. var $1;
  253. $1=self._tag_("body");
  254. return $1;
  255. }, function($ctx1) {$ctx1.fill(self,"body",{},smalltalk.HTMLCanvas)})},
  256. args: [],
  257. source: "body\x0a\x09^self tag: 'body'",
  258. messageSends: ["tag:"],
  259. referencedClasses: []
  260. }),
  261. smalltalk.HTMLCanvas);
  262. smalltalk.addMethod(
  263. smalltalk.method({
  264. selector: "br",
  265. category: 'tags',
  266. fn: function (){
  267. var self=this;
  268. return smalltalk.withContext(function($ctx1) {
  269. var $1;
  270. $1=self._tag_("br");
  271. return $1;
  272. }, function($ctx1) {$ctx1.fill(self,"br",{},smalltalk.HTMLCanvas)})},
  273. args: [],
  274. source: "br\x0a\x09^self tag: 'br'",
  275. messageSends: ["tag:"],
  276. referencedClasses: []
  277. }),
  278. smalltalk.HTMLCanvas);
  279. smalltalk.addMethod(
  280. smalltalk.method({
  281. selector: "button",
  282. category: 'tags',
  283. fn: function (){
  284. var self=this;
  285. return smalltalk.withContext(function($ctx1) {
  286. var $1;
  287. $1=self._tag_("button");
  288. return $1;
  289. }, function($ctx1) {$ctx1.fill(self,"button",{},smalltalk.HTMLCanvas)})},
  290. args: [],
  291. source: "button\x0a\x09^self tag: 'button'",
  292. messageSends: ["tag:"],
  293. referencedClasses: []
  294. }),
  295. smalltalk.HTMLCanvas);
  296. smalltalk.addMethod(
  297. smalltalk.method({
  298. selector: "canvas",
  299. category: 'tags',
  300. fn: function (){
  301. var self=this;
  302. return smalltalk.withContext(function($ctx1) {
  303. var $1;
  304. $1=self._tag_("canvas");
  305. return $1;
  306. }, function($ctx1) {$ctx1.fill(self,"canvas",{},smalltalk.HTMLCanvas)})},
  307. args: [],
  308. source: "canvas\x0a\x09^self tag: 'canvas'",
  309. messageSends: ["tag:"],
  310. referencedClasses: []
  311. }),
  312. smalltalk.HTMLCanvas);
  313. smalltalk.addMethod(
  314. smalltalk.method({
  315. selector: "caption",
  316. category: 'tags',
  317. fn: function (){
  318. var self=this;
  319. return smalltalk.withContext(function($ctx1) {
  320. var $1;
  321. $1=self._tag_("caption");
  322. return $1;
  323. }, function($ctx1) {$ctx1.fill(self,"caption",{},smalltalk.HTMLCanvas)})},
  324. args: [],
  325. source: "caption\x0a\x09^self tag: 'caption'",
  326. messageSends: ["tag:"],
  327. referencedClasses: []
  328. }),
  329. smalltalk.HTMLCanvas);
  330. smalltalk.addMethod(
  331. smalltalk.method({
  332. selector: "cite",
  333. category: 'tags',
  334. fn: function (){
  335. var self=this;
  336. return smalltalk.withContext(function($ctx1) {
  337. var $1;
  338. $1=self._tag_("cite");
  339. return $1;
  340. }, function($ctx1) {$ctx1.fill(self,"cite",{},smalltalk.HTMLCanvas)})},
  341. args: [],
  342. source: "cite\x0a\x09^self tag: 'cite'",
  343. messageSends: ["tag:"],
  344. referencedClasses: []
  345. }),
  346. smalltalk.HTMLCanvas);
  347. smalltalk.addMethod(
  348. smalltalk.method({
  349. selector: "code",
  350. category: 'tags',
  351. fn: function (){
  352. var self=this;
  353. return smalltalk.withContext(function($ctx1) {
  354. var $1;
  355. $1=self._tag_("code");
  356. return $1;
  357. }, function($ctx1) {$ctx1.fill(self,"code",{},smalltalk.HTMLCanvas)})},
  358. args: [],
  359. source: "code\x0a\x09^self tag: 'code'",
  360. messageSends: ["tag:"],
  361. referencedClasses: []
  362. }),
  363. smalltalk.HTMLCanvas);
  364. smalltalk.addMethod(
  365. smalltalk.method({
  366. selector: "col",
  367. category: 'tags',
  368. fn: function (){
  369. var self=this;
  370. return smalltalk.withContext(function($ctx1) {
  371. var $1;
  372. $1=self._tag_("col");
  373. return $1;
  374. }, function($ctx1) {$ctx1.fill(self,"col",{},smalltalk.HTMLCanvas)})},
  375. args: [],
  376. source: "col\x0a\x09^self tag: 'col'",
  377. messageSends: ["tag:"],
  378. referencedClasses: []
  379. }),
  380. smalltalk.HTMLCanvas);
  381. smalltalk.addMethod(
  382. smalltalk.method({
  383. selector: "colgroup",
  384. category: 'tags',
  385. fn: function (){
  386. var self=this;
  387. return smalltalk.withContext(function($ctx1) {
  388. var $1;
  389. $1=self._tag_("colgroup");
  390. return $1;
  391. }, function($ctx1) {$ctx1.fill(self,"colgroup",{},smalltalk.HTMLCanvas)})},
  392. args: [],
  393. source: "colgroup\x0a\x09^self tag: 'colgroup'",
  394. messageSends: ["tag:"],
  395. referencedClasses: []
  396. }),
  397. smalltalk.HTMLCanvas);
  398. smalltalk.addMethod(
  399. smalltalk.method({
  400. selector: "command",
  401. category: 'tags',
  402. fn: function (){
  403. var self=this;
  404. return smalltalk.withContext(function($ctx1) {
  405. var $1;
  406. $1=self._tag_("command");
  407. return $1;
  408. }, function($ctx1) {$ctx1.fill(self,"command",{},smalltalk.HTMLCanvas)})},
  409. args: [],
  410. source: "command\x0a\x09^self tag: 'command'",
  411. messageSends: ["tag:"],
  412. referencedClasses: []
  413. }),
  414. smalltalk.HTMLCanvas);
  415. smalltalk.addMethod(
  416. smalltalk.method({
  417. selector: "datalist",
  418. category: 'tags',
  419. fn: function (){
  420. var self=this;
  421. return smalltalk.withContext(function($ctx1) {
  422. var $1;
  423. $1=self._tag_("datalist");
  424. return $1;
  425. }, function($ctx1) {$ctx1.fill(self,"datalist",{},smalltalk.HTMLCanvas)})},
  426. args: [],
  427. source: "datalist\x0a\x09^self tag: 'datalist'",
  428. messageSends: ["tag:"],
  429. referencedClasses: []
  430. }),
  431. smalltalk.HTMLCanvas);
  432. smalltalk.addMethod(
  433. smalltalk.method({
  434. selector: "dd",
  435. category: 'tags',
  436. fn: function (){
  437. var self=this;
  438. return smalltalk.withContext(function($ctx1) {
  439. var $1;
  440. $1=self._tag_("dd");
  441. return $1;
  442. }, function($ctx1) {$ctx1.fill(self,"dd",{},smalltalk.HTMLCanvas)})},
  443. args: [],
  444. source: "dd\x0a\x09^self tag: 'dd'",
  445. messageSends: ["tag:"],
  446. referencedClasses: []
  447. }),
  448. smalltalk.HTMLCanvas);
  449. smalltalk.addMethod(
  450. smalltalk.method({
  451. selector: "del",
  452. category: 'tags',
  453. fn: function (){
  454. var self=this;
  455. return smalltalk.withContext(function($ctx1) {
  456. var $1;
  457. $1=self._tag_("del");
  458. return $1;
  459. }, function($ctx1) {$ctx1.fill(self,"del",{},smalltalk.HTMLCanvas)})},
  460. args: [],
  461. source: "del\x0a\x09^self tag: 'del'",
  462. messageSends: ["tag:"],
  463. referencedClasses: []
  464. }),
  465. smalltalk.HTMLCanvas);
  466. smalltalk.addMethod(
  467. smalltalk.method({
  468. selector: "details",
  469. category: 'tags',
  470. fn: function (){
  471. var self=this;
  472. return smalltalk.withContext(function($ctx1) {
  473. var $1;
  474. $1=self._tag_("details");
  475. return $1;
  476. }, function($ctx1) {$ctx1.fill(self,"details",{},smalltalk.HTMLCanvas)})},
  477. args: [],
  478. source: "details\x0a\x09^self tag: 'details'",
  479. messageSends: ["tag:"],
  480. referencedClasses: []
  481. }),
  482. smalltalk.HTMLCanvas);
  483. smalltalk.addMethod(
  484. smalltalk.method({
  485. selector: "div",
  486. category: 'tags',
  487. fn: function (){
  488. var self=this;
  489. return smalltalk.withContext(function($ctx1) {
  490. var $1;
  491. $1=self._tag_("div");
  492. return $1;
  493. }, function($ctx1) {$ctx1.fill(self,"div",{},smalltalk.HTMLCanvas)})},
  494. args: [],
  495. source: "div\x0a\x09^self tag: 'div'",
  496. messageSends: ["tag:"],
  497. referencedClasses: []
  498. }),
  499. smalltalk.HTMLCanvas);
  500. smalltalk.addMethod(
  501. smalltalk.method({
  502. selector: "div:",
  503. category: 'tags',
  504. fn: function (aBlock){
  505. var self=this;
  506. return smalltalk.withContext(function($ctx1) {
  507. var $1;
  508. $1=_st(self._div())._with_(aBlock);
  509. return $1;
  510. }, function($ctx1) {$ctx1.fill(self,"div:",{aBlock:aBlock},smalltalk.HTMLCanvas)})},
  511. args: ["aBlock"],
  512. source: "div: aBlock\x0a\x09^self div with: aBlock",
  513. messageSends: ["with:", "div"],
  514. referencedClasses: []
  515. }),
  516. smalltalk.HTMLCanvas);
  517. smalltalk.addMethod(
  518. smalltalk.method({
  519. selector: "dl",
  520. category: 'tags',
  521. fn: function (){
  522. var self=this;
  523. return smalltalk.withContext(function($ctx1) {
  524. var $1;
  525. $1=self._tag_("dl");
  526. return $1;
  527. }, function($ctx1) {$ctx1.fill(self,"dl",{},smalltalk.HTMLCanvas)})},
  528. args: [],
  529. source: "dl\x0a\x09^self tag: 'dl'",
  530. messageSends: ["tag:"],
  531. referencedClasses: []
  532. }),
  533. smalltalk.HTMLCanvas);
  534. smalltalk.addMethod(
  535. smalltalk.method({
  536. selector: "dt",
  537. category: 'tags',
  538. fn: function (){
  539. var self=this;
  540. return smalltalk.withContext(function($ctx1) {
  541. var $1;
  542. $1=self._tag_("dt");
  543. return $1;
  544. }, function($ctx1) {$ctx1.fill(self,"dt",{},smalltalk.HTMLCanvas)})},
  545. args: [],
  546. source: "dt\x0a\x09^self tag: 'dt'",
  547. messageSends: ["tag:"],
  548. referencedClasses: []
  549. }),
  550. smalltalk.HTMLCanvas);
  551. smalltalk.addMethod(
  552. smalltalk.method({
  553. selector: "em",
  554. category: 'tags',
  555. fn: function (){
  556. var self=this;
  557. return smalltalk.withContext(function($ctx1) {
  558. var $1;
  559. $1=self._tag_("em");
  560. return $1;
  561. }, function($ctx1) {$ctx1.fill(self,"em",{},smalltalk.HTMLCanvas)})},
  562. args: [],
  563. source: "em\x0a\x09^self tag: 'em'",
  564. messageSends: ["tag:"],
  565. referencedClasses: []
  566. }),
  567. smalltalk.HTMLCanvas);
  568. smalltalk.addMethod(
  569. smalltalk.method({
  570. selector: "embed",
  571. category: 'tags',
  572. fn: function (){
  573. var self=this;
  574. return smalltalk.withContext(function($ctx1) {
  575. var $1;
  576. $1=self._tag_("embed");
  577. return $1;
  578. }, function($ctx1) {$ctx1.fill(self,"embed",{},smalltalk.HTMLCanvas)})},
  579. args: [],
  580. source: "embed\x0a\x09^self tag: 'embed'",
  581. messageSends: ["tag:"],
  582. referencedClasses: []
  583. }),
  584. smalltalk.HTMLCanvas);
  585. smalltalk.addMethod(
  586. smalltalk.method({
  587. selector: "entity:",
  588. category: 'adding',
  589. fn: function (aString){
  590. var self=this;
  591. var result;
  592. return smalltalk.withContext(function($ctx1) {
  593. var $2,$4,$3,$1,$5;
  594. $2="<span />"._asJQuery();
  595. $4="&".__comma(aString);
  596. $ctx1.sendIdx[","]=2;
  597. $3=_st($4).__comma(";");
  598. $ctx1.sendIdx[","]=1;
  599. $1=_st($2)._html_($3);
  600. result=_st($1)._text();
  601. $5=_st(_st(result)._size()).__eq((1));
  602. if(! smalltalk.assert($5)){
  603. self._error_("Not an HTML entity: ".__comma(aString));
  604. };
  605. self._with_(result);
  606. return self}, function($ctx1) {$ctx1.fill(self,"entity:",{aString:aString,result:result},smalltalk.HTMLCanvas)})},
  607. args: ["aString"],
  608. source: "entity: aString\x0a\x09\x22Adds a character representing html entity, eg.\x0a\x09html entity: 'copy'\x0a\x09adds a copyright sign.\x0a\x09If a name does not represent valid HTML entity, error is raised.\x22\x0a\x09| result |\x0a\x09result := ('<span />' asJQuery html: '&', aString, ';') text.\x0a\x09result size = 1 ifFalse: [ self error: 'Not an HTML entity: ', aString ].\x0a\x09self with: result",
  609. messageSends: ["text", "html:", "asJQuery", ",", "ifFalse:", "=", "size", "error:", "with:"],
  610. referencedClasses: []
  611. }),
  612. smalltalk.HTMLCanvas);
  613. smalltalk.addMethod(
  614. smalltalk.method({
  615. selector: "fieldset",
  616. category: 'tags',
  617. fn: function (){
  618. var self=this;
  619. return smalltalk.withContext(function($ctx1) {
  620. var $1;
  621. $1=self._tag_("fieldset");
  622. return $1;
  623. }, function($ctx1) {$ctx1.fill(self,"fieldset",{},smalltalk.HTMLCanvas)})},
  624. args: [],
  625. source: "fieldset\x0a\x09^self tag: 'fieldset'",
  626. messageSends: ["tag:"],
  627. referencedClasses: []
  628. }),
  629. smalltalk.HTMLCanvas);
  630. smalltalk.addMethod(
  631. smalltalk.method({
  632. selector: "figcaption",
  633. category: 'tags',
  634. fn: function (){
  635. var self=this;
  636. return smalltalk.withContext(function($ctx1) {
  637. var $1;
  638. $1=self._tag_("figcaption");
  639. return $1;
  640. }, function($ctx1) {$ctx1.fill(self,"figcaption",{},smalltalk.HTMLCanvas)})},
  641. args: [],
  642. source: "figcaption\x0a\x09^self tag: 'figcaption'",
  643. messageSends: ["tag:"],
  644. referencedClasses: []
  645. }),
  646. smalltalk.HTMLCanvas);
  647. smalltalk.addMethod(
  648. smalltalk.method({
  649. selector: "figure",
  650. category: 'tags',
  651. fn: function (){
  652. var self=this;
  653. return smalltalk.withContext(function($ctx1) {
  654. var $1;
  655. $1=self._tag_("figure");
  656. return $1;
  657. }, function($ctx1) {$ctx1.fill(self,"figure",{},smalltalk.HTMLCanvas)})},
  658. args: [],
  659. source: "figure\x0a\x09^self tag: 'figure'",
  660. messageSends: ["tag:"],
  661. referencedClasses: []
  662. }),
  663. smalltalk.HTMLCanvas);
  664. smalltalk.addMethod(
  665. smalltalk.method({
  666. selector: "footer",
  667. category: 'tags',
  668. fn: function (){
  669. var self=this;
  670. return smalltalk.withContext(function($ctx1) {
  671. var $1;
  672. $1=self._tag_("footer");
  673. return $1;
  674. }, function($ctx1) {$ctx1.fill(self,"footer",{},smalltalk.HTMLCanvas)})},
  675. args: [],
  676. source: "footer\x0a\x09^self tag: 'footer'",
  677. messageSends: ["tag:"],
  678. referencedClasses: []
  679. }),
  680. smalltalk.HTMLCanvas);
  681. smalltalk.addMethod(
  682. smalltalk.method({
  683. selector: "form",
  684. category: 'tags',
  685. fn: function (){
  686. var self=this;
  687. return smalltalk.withContext(function($ctx1) {
  688. var $1;
  689. $1=self._tag_("form");
  690. return $1;
  691. }, function($ctx1) {$ctx1.fill(self,"form",{},smalltalk.HTMLCanvas)})},
  692. args: [],
  693. source: "form\x0a\x09^self tag: 'form'",
  694. messageSends: ["tag:"],
  695. referencedClasses: []
  696. }),
  697. smalltalk.HTMLCanvas);
  698. smalltalk.addMethod(
  699. smalltalk.method({
  700. selector: "h1",
  701. category: 'tags',
  702. fn: function (){
  703. var self=this;
  704. return smalltalk.withContext(function($ctx1) {
  705. var $1;
  706. $1=self._tag_("h1");
  707. return $1;
  708. }, function($ctx1) {$ctx1.fill(self,"h1",{},smalltalk.HTMLCanvas)})},
  709. args: [],
  710. source: "h1\x0a\x09^self tag: 'h1'",
  711. messageSends: ["tag:"],
  712. referencedClasses: []
  713. }),
  714. smalltalk.HTMLCanvas);
  715. smalltalk.addMethod(
  716. smalltalk.method({
  717. selector: "h1:",
  718. category: 'tags',
  719. fn: function (anObject){
  720. var self=this;
  721. return smalltalk.withContext(function($ctx1) {
  722. var $1;
  723. $1=_st(self._h1())._with_(anObject);
  724. return $1;
  725. }, function($ctx1) {$ctx1.fill(self,"h1:",{anObject:anObject},smalltalk.HTMLCanvas)})},
  726. args: ["anObject"],
  727. source: "h1: anObject\x0a\x09^self h1 with: anObject",
  728. messageSends: ["with:", "h1"],
  729. referencedClasses: []
  730. }),
  731. smalltalk.HTMLCanvas);
  732. smalltalk.addMethod(
  733. smalltalk.method({
  734. selector: "h2",
  735. category: 'tags',
  736. fn: function (){
  737. var self=this;
  738. return smalltalk.withContext(function($ctx1) {
  739. var $1;
  740. $1=self._tag_("h2");
  741. return $1;
  742. }, function($ctx1) {$ctx1.fill(self,"h2",{},smalltalk.HTMLCanvas)})},
  743. args: [],
  744. source: "h2\x0a\x09^self tag: 'h2'",
  745. messageSends: ["tag:"],
  746. referencedClasses: []
  747. }),
  748. smalltalk.HTMLCanvas);
  749. smalltalk.addMethod(
  750. smalltalk.method({
  751. selector: "h2:",
  752. category: 'tags',
  753. fn: function (anObject){
  754. var self=this;
  755. return smalltalk.withContext(function($ctx1) {
  756. var $1;
  757. $1=_st(self._h2())._with_(anObject);
  758. return $1;
  759. }, function($ctx1) {$ctx1.fill(self,"h2:",{anObject:anObject},smalltalk.HTMLCanvas)})},
  760. args: ["anObject"],
  761. source: "h2: anObject\x0a\x09^ self h2 with: anObject",
  762. messageSends: ["with:", "h2"],
  763. referencedClasses: []
  764. }),
  765. smalltalk.HTMLCanvas);
  766. smalltalk.addMethod(
  767. smalltalk.method({
  768. selector: "h3",
  769. category: 'tags',
  770. fn: function (){
  771. var self=this;
  772. return smalltalk.withContext(function($ctx1) {
  773. var $1;
  774. $1=self._tag_("h3");
  775. return $1;
  776. }, function($ctx1) {$ctx1.fill(self,"h3",{},smalltalk.HTMLCanvas)})},
  777. args: [],
  778. source: "h3\x0a\x09^self tag: 'h3'",
  779. messageSends: ["tag:"],
  780. referencedClasses: []
  781. }),
  782. smalltalk.HTMLCanvas);
  783. smalltalk.addMethod(
  784. smalltalk.method({
  785. selector: "h3:",
  786. category: 'tags',
  787. fn: function (anObject){
  788. var self=this;
  789. return smalltalk.withContext(function($ctx1) {
  790. var $1;
  791. $1=_st(self._h3())._with_(anObject);
  792. return $1;
  793. }, function($ctx1) {$ctx1.fill(self,"h3:",{anObject:anObject},smalltalk.HTMLCanvas)})},
  794. args: ["anObject"],
  795. source: "h3: anObject\x0a\x09^self h3 with: anObject",
  796. messageSends: ["with:", "h3"],
  797. referencedClasses: []
  798. }),
  799. smalltalk.HTMLCanvas);
  800. smalltalk.addMethod(
  801. smalltalk.method({
  802. selector: "h4",
  803. category: 'tags',
  804. fn: function (){
  805. var self=this;
  806. return smalltalk.withContext(function($ctx1) {
  807. var $1;
  808. $1=self._tag_("h4");
  809. return $1;
  810. }, function($ctx1) {$ctx1.fill(self,"h4",{},smalltalk.HTMLCanvas)})},
  811. args: [],
  812. source: "h4\x0a\x09^self tag: 'h4'",
  813. messageSends: ["tag:"],
  814. referencedClasses: []
  815. }),
  816. smalltalk.HTMLCanvas);
  817. smalltalk.addMethod(
  818. smalltalk.method({
  819. selector: "h4:",
  820. category: 'tags',
  821. fn: function (anObject){
  822. var self=this;
  823. return smalltalk.withContext(function($ctx1) {
  824. var $1;
  825. $1=_st(self._h4())._with_(anObject);
  826. return $1;
  827. }, function($ctx1) {$ctx1.fill(self,"h4:",{anObject:anObject},smalltalk.HTMLCanvas)})},
  828. args: ["anObject"],
  829. source: "h4: anObject\x0a\x09^self h4 with: anObject",
  830. messageSends: ["with:", "h4"],
  831. referencedClasses: []
  832. }),
  833. smalltalk.HTMLCanvas);
  834. smalltalk.addMethod(
  835. smalltalk.method({
  836. selector: "h5",
  837. category: 'tags',
  838. fn: function (){
  839. var self=this;
  840. return smalltalk.withContext(function($ctx1) {
  841. var $1;
  842. $1=self._tag_("h5");
  843. return $1;
  844. }, function($ctx1) {$ctx1.fill(self,"h5",{},smalltalk.HTMLCanvas)})},
  845. args: [],
  846. source: "h5\x0a\x09^self tag: 'h5'",
  847. messageSends: ["tag:"],
  848. referencedClasses: []
  849. }),
  850. smalltalk.HTMLCanvas);
  851. smalltalk.addMethod(
  852. smalltalk.method({
  853. selector: "h5:",
  854. category: 'tags',
  855. fn: function (anObject){
  856. var self=this;
  857. return smalltalk.withContext(function($ctx1) {
  858. var $1;
  859. $1=_st(self._h5())._with_(anObject);
  860. return $1;
  861. }, function($ctx1) {$ctx1.fill(self,"h5:",{anObject:anObject},smalltalk.HTMLCanvas)})},
  862. args: ["anObject"],
  863. source: "h5: anObject\x0a\x09^self h5 with: anObject",
  864. messageSends: ["with:", "h5"],
  865. referencedClasses: []
  866. }),
  867. smalltalk.HTMLCanvas);
  868. smalltalk.addMethod(
  869. smalltalk.method({
  870. selector: "h6",
  871. category: 'tags',
  872. fn: function (){
  873. var self=this;
  874. return smalltalk.withContext(function($ctx1) {
  875. var $1;
  876. $1=self._tag_("h6");
  877. return $1;
  878. }, function($ctx1) {$ctx1.fill(self,"h6",{},smalltalk.HTMLCanvas)})},
  879. args: [],
  880. source: "h6\x0a\x09^self tag: 'h6'",
  881. messageSends: ["tag:"],
  882. referencedClasses: []
  883. }),
  884. smalltalk.HTMLCanvas);
  885. smalltalk.addMethod(
  886. smalltalk.method({
  887. selector: "h6:",
  888. category: 'tags',
  889. fn: function (anObject){
  890. var self=this;
  891. return smalltalk.withContext(function($ctx1) {
  892. var $1;
  893. $1=_st(self._h6())._with_(anObject);
  894. return $1;
  895. }, function($ctx1) {$ctx1.fill(self,"h6:",{anObject:anObject},smalltalk.HTMLCanvas)})},
  896. args: ["anObject"],
  897. source: "h6: anObject\x0a\x09^self h6 with: anObject",
  898. messageSends: ["with:", "h6"],
  899. referencedClasses: []
  900. }),
  901. smalltalk.HTMLCanvas);
  902. smalltalk.addMethod(
  903. smalltalk.method({
  904. selector: "head",
  905. category: 'tags',
  906. fn: function (){
  907. var self=this;
  908. return smalltalk.withContext(function($ctx1) {
  909. var $1;
  910. $1=self._tag_("head");
  911. return $1;
  912. }, function($ctx1) {$ctx1.fill(self,"head",{},smalltalk.HTMLCanvas)})},
  913. args: [],
  914. source: "head\x0a\x09^self tag: 'head'",
  915. messageSends: ["tag:"],
  916. referencedClasses: []
  917. }),
  918. smalltalk.HTMLCanvas);
  919. smalltalk.addMethod(
  920. smalltalk.method({
  921. selector: "header",
  922. category: 'tags',
  923. fn: function (){
  924. var self=this;
  925. return smalltalk.withContext(function($ctx1) {
  926. var $1;
  927. $1=self._tag_("header");
  928. return $1;
  929. }, function($ctx1) {$ctx1.fill(self,"header",{},smalltalk.HTMLCanvas)})},
  930. args: [],
  931. source: "header\x0a\x09^self tag: 'header'",
  932. messageSends: ["tag:"],
  933. referencedClasses: []
  934. }),
  935. smalltalk.HTMLCanvas);
  936. smalltalk.addMethod(
  937. smalltalk.method({
  938. selector: "hgroup",
  939. category: 'tags',
  940. fn: function (){
  941. var self=this;
  942. return smalltalk.withContext(function($ctx1) {
  943. var $1;
  944. $1=self._tag_("hgroup");
  945. return $1;
  946. }, function($ctx1) {$ctx1.fill(self,"hgroup",{},smalltalk.HTMLCanvas)})},
  947. args: [],
  948. source: "hgroup\x0a\x09^self tag: 'hgroup'",
  949. messageSends: ["tag:"],
  950. referencedClasses: []
  951. }),
  952. smalltalk.HTMLCanvas);
  953. smalltalk.addMethod(
  954. smalltalk.method({
  955. selector: "hr",
  956. category: 'tags',
  957. fn: function (){
  958. var self=this;
  959. return smalltalk.withContext(function($ctx1) {
  960. var $1;
  961. $1=self._tag_("hr");
  962. return $1;
  963. }, function($ctx1) {$ctx1.fill(self,"hr",{},smalltalk.HTMLCanvas)})},
  964. args: [],
  965. source: "hr\x0a\x09^self tag: 'hr'",
  966. messageSends: ["tag:"],
  967. referencedClasses: []
  968. }),
  969. smalltalk.HTMLCanvas);
  970. smalltalk.addMethod(
  971. smalltalk.method({
  972. selector: "html",
  973. category: 'tags',
  974. fn: function (){
  975. var self=this;
  976. return smalltalk.withContext(function($ctx1) {
  977. var $1;
  978. $1=self._tag_("html");
  979. return $1;
  980. }, function($ctx1) {$ctx1.fill(self,"html",{},smalltalk.HTMLCanvas)})},
  981. args: [],
  982. source: "html\x0a\x09^self tag: 'html'",
  983. messageSends: ["tag:"],
  984. referencedClasses: []
  985. }),
  986. smalltalk.HTMLCanvas);
  987. smalltalk.addMethod(
  988. smalltalk.method({
  989. selector: "iframe",
  990. category: 'tags',
  991. fn: function (){
  992. var self=this;
  993. return smalltalk.withContext(function($ctx1) {
  994. var $1;
  995. $1=self._tag_("iframe");
  996. return $1;
  997. }, function($ctx1) {$ctx1.fill(self,"iframe",{},smalltalk.HTMLCanvas)})},
  998. args: [],
  999. source: "iframe\x0a\x09^self tag: 'iframe'",
  1000. messageSends: ["tag:"],
  1001. referencedClasses: []
  1002. }),
  1003. smalltalk.HTMLCanvas);
  1004. smalltalk.addMethod(
  1005. smalltalk.method({
  1006. selector: "iframe:",
  1007. category: 'tags',
  1008. fn: function (aString){
  1009. var self=this;
  1010. return smalltalk.withContext(function($ctx1) {
  1011. var $1;
  1012. $1=_st(self._iframe())._src_(aString);
  1013. return $1;
  1014. }, function($ctx1) {$ctx1.fill(self,"iframe:",{aString:aString},smalltalk.HTMLCanvas)})},
  1015. args: ["aString"],
  1016. source: "iframe: aString\x0a\x09^self iframe src: aString",
  1017. messageSends: ["src:", "iframe"],
  1018. referencedClasses: []
  1019. }),
  1020. smalltalk.HTMLCanvas);
  1021. smalltalk.addMethod(
  1022. smalltalk.method({
  1023. selector: "img",
  1024. category: 'tags',
  1025. fn: function (){
  1026. var self=this;
  1027. return smalltalk.withContext(function($ctx1) {
  1028. var $1;
  1029. $1=self._tag_("img");
  1030. return $1;
  1031. }, function($ctx1) {$ctx1.fill(self,"img",{},smalltalk.HTMLCanvas)})},
  1032. args: [],
  1033. source: "img\x0a\x09^self tag: 'img'",
  1034. messageSends: ["tag:"],
  1035. referencedClasses: []
  1036. }),
  1037. smalltalk.HTMLCanvas);
  1038. smalltalk.addMethod(
  1039. smalltalk.method({
  1040. selector: "img:",
  1041. category: 'tags',
  1042. fn: function (aString){
  1043. var self=this;
  1044. return smalltalk.withContext(function($ctx1) {
  1045. var $1;
  1046. $1=_st(self._img())._src_(aString);
  1047. return $1;
  1048. }, function($ctx1) {$ctx1.fill(self,"img:",{aString:aString},smalltalk.HTMLCanvas)})},
  1049. args: ["aString"],
  1050. source: "img: aString\x0a\x09^self img src: aString",
  1051. messageSends: ["src:", "img"],
  1052. referencedClasses: []
  1053. }),
  1054. smalltalk.HTMLCanvas);
  1055. smalltalk.addMethod(
  1056. smalltalk.method({
  1057. selector: "initialize",
  1058. category: 'initialization',
  1059. fn: function (){
  1060. var self=this;
  1061. function $TagBrush(){return smalltalk.TagBrush||(typeof TagBrush=="undefined"?nil:TagBrush)}
  1062. return smalltalk.withContext(function($ctx1) {
  1063. var $1;
  1064. smalltalk.HTMLCanvas.superclass.fn.prototype._initialize.apply(_st(self), []);
  1065. $1=self["@root"];
  1066. if(($receiver = $1) == nil || $receiver == null){
  1067. self["@root"]=_st($TagBrush())._fromString_canvas_("div",self);
  1068. self["@root"];
  1069. } else {
  1070. $1;
  1071. };
  1072. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HTMLCanvas)})},
  1073. args: [],
  1074. source: "initialize\x0a\x09super initialize.\x0a\x09root ifNil: [root := TagBrush fromString: 'div' canvas: self]",
  1075. messageSends: ["initialize", "ifNil:", "fromString:canvas:"],
  1076. referencedClasses: ["TagBrush"]
  1077. }),
  1078. smalltalk.HTMLCanvas);
  1079. smalltalk.addMethod(
  1080. smalltalk.method({
  1081. selector: "initializeFromJQuery:",
  1082. category: 'initialization',
  1083. fn: function (aJQuery){
  1084. var self=this;
  1085. function $TagBrush(){return smalltalk.TagBrush||(typeof TagBrush=="undefined"?nil:TagBrush)}
  1086. return smalltalk.withContext(function($ctx1) {
  1087. self["@root"]=_st($TagBrush())._fromJQuery_canvas_(aJQuery,self);
  1088. return self}, function($ctx1) {$ctx1.fill(self,"initializeFromJQuery:",{aJQuery:aJQuery},smalltalk.HTMLCanvas)})},
  1089. args: ["aJQuery"],
  1090. source: "initializeFromJQuery: aJQuery\x0a\x09root := TagBrush fromJQuery: aJQuery canvas: self",
  1091. messageSends: ["fromJQuery:canvas:"],
  1092. referencedClasses: ["TagBrush"]
  1093. }),
  1094. smalltalk.HTMLCanvas);
  1095. smalltalk.addMethod(
  1096. smalltalk.method({
  1097. selector: "input",
  1098. category: 'tags',
  1099. fn: function (){
  1100. var self=this;
  1101. return smalltalk.withContext(function($ctx1) {
  1102. var $1;
  1103. $1=self._tag_("input");
  1104. return $1;
  1105. }, function($ctx1) {$ctx1.fill(self,"input",{},smalltalk.HTMLCanvas)})},
  1106. args: [],
  1107. source: "input\x0a\x09^self tag: 'input'",
  1108. messageSends: ["tag:"],
  1109. referencedClasses: []
  1110. }),
  1111. smalltalk.HTMLCanvas);
  1112. smalltalk.addMethod(
  1113. smalltalk.method({
  1114. selector: "label",
  1115. category: 'tags',
  1116. fn: function (){
  1117. var self=this;
  1118. return smalltalk.withContext(function($ctx1) {
  1119. var $1;
  1120. $1=self._tag_("label");
  1121. return $1;
  1122. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HTMLCanvas)})},
  1123. args: [],
  1124. source: "label\x0a\x09^self tag: 'label'",
  1125. messageSends: ["tag:"],
  1126. referencedClasses: []
  1127. }),
  1128. smalltalk.HTMLCanvas);
  1129. smalltalk.addMethod(
  1130. smalltalk.method({
  1131. selector: "legend",
  1132. category: 'tags',
  1133. fn: function (){
  1134. var self=this;
  1135. return smalltalk.withContext(function($ctx1) {
  1136. var $1;
  1137. $1=self._tag_("legend");
  1138. return $1;
  1139. }, function($ctx1) {$ctx1.fill(self,"legend",{},smalltalk.HTMLCanvas)})},
  1140. args: [],
  1141. source: "legend\x0a\x09^self tag: 'legend'",
  1142. messageSends: ["tag:"],
  1143. referencedClasses: []
  1144. }),
  1145. smalltalk.HTMLCanvas);
  1146. smalltalk.addMethod(
  1147. smalltalk.method({
  1148. selector: "li",
  1149. category: 'tags',
  1150. fn: function (){
  1151. var self=this;
  1152. return smalltalk.withContext(function($ctx1) {
  1153. var $1;
  1154. $1=self._tag_("li");
  1155. return $1;
  1156. }, function($ctx1) {$ctx1.fill(self,"li",{},smalltalk.HTMLCanvas)})},
  1157. args: [],
  1158. source: "li\x0a\x09^self tag: 'li'",
  1159. messageSends: ["tag:"],
  1160. referencedClasses: []
  1161. }),
  1162. smalltalk.HTMLCanvas);
  1163. smalltalk.addMethod(
  1164. smalltalk.method({
  1165. selector: "li:",
  1166. category: 'tags',
  1167. fn: function (anObject){
  1168. var self=this;
  1169. return smalltalk.withContext(function($ctx1) {
  1170. var $1;
  1171. $1=_st(self._li())._with_(anObject);
  1172. return $1;
  1173. }, function($ctx1) {$ctx1.fill(self,"li:",{anObject:anObject},smalltalk.HTMLCanvas)})},
  1174. args: ["anObject"],
  1175. source: "li: anObject\x0a\x09^self li with: anObject",
  1176. messageSends: ["with:", "li"],
  1177. referencedClasses: []
  1178. }),
  1179. smalltalk.HTMLCanvas);
  1180. smalltalk.addMethod(
  1181. smalltalk.method({
  1182. selector: "link",
  1183. category: 'tags',
  1184. fn: function (){
  1185. var self=this;
  1186. return smalltalk.withContext(function($ctx1) {
  1187. var $1;
  1188. $1=self._tag_("link");
  1189. return $1;
  1190. }, function($ctx1) {$ctx1.fill(self,"link",{},smalltalk.HTMLCanvas)})},
  1191. args: [],
  1192. source: "link\x0a\x09^self tag: 'link'",
  1193. messageSends: ["tag:"],
  1194. referencedClasses: []
  1195. }),
  1196. smalltalk.HTMLCanvas);
  1197. smalltalk.addMethod(
  1198. smalltalk.method({
  1199. selector: "map",
  1200. category: 'tags',
  1201. fn: function (){
  1202. var self=this;
  1203. return smalltalk.withContext(function($ctx1) {
  1204. var $1;
  1205. $1=self._tag_("map");
  1206. return $1;
  1207. }, function($ctx1) {$ctx1.fill(self,"map",{},smalltalk.HTMLCanvas)})},
  1208. args: [],
  1209. source: "map\x0a\x09^self tag: 'map'",
  1210. messageSends: ["tag:"],
  1211. referencedClasses: []
  1212. }),
  1213. smalltalk.HTMLCanvas);
  1214. smalltalk.addMethod(
  1215. smalltalk.method({
  1216. selector: "mark",
  1217. category: 'tags',
  1218. fn: function (){
  1219. var self=this;
  1220. return smalltalk.withContext(function($ctx1) {
  1221. var $1;
  1222. $1=self._tag_("mark");
  1223. return $1;
  1224. }, function($ctx1) {$ctx1.fill(self,"mark",{},smalltalk.HTMLCanvas)})},
  1225. args: [],
  1226. source: "mark\x0a\x09^self tag: 'mark'",
  1227. messageSends: ["tag:"],
  1228. referencedClasses: []
  1229. }),
  1230. smalltalk.HTMLCanvas);
  1231. smalltalk.addMethod(
  1232. smalltalk.method({
  1233. selector: "menu",
  1234. category: 'tags',
  1235. fn: function (){
  1236. var self=this;
  1237. return smalltalk.withContext(function($ctx1) {
  1238. var $1;
  1239. $1=self._tag_("menu");
  1240. return $1;
  1241. }, function($ctx1) {$ctx1.fill(self,"menu",{},smalltalk.HTMLCanvas)})},
  1242. args: [],
  1243. source: "menu\x0a\x09^self tag: 'menu'",
  1244. messageSends: ["tag:"],
  1245. referencedClasses: []
  1246. }),
  1247. smalltalk.HTMLCanvas);
  1248. smalltalk.addMethod(
  1249. smalltalk.method({
  1250. selector: "meta",
  1251. category: 'tags',
  1252. fn: function (){
  1253. var self=this;
  1254. return smalltalk.withContext(function($ctx1) {
  1255. var $1;
  1256. $1=self._tag_("meta");
  1257. return $1;
  1258. }, function($ctx1) {$ctx1.fill(self,"meta",{},smalltalk.HTMLCanvas)})},
  1259. args: [],
  1260. source: "meta\x0a\x09^self tag: 'meta'",
  1261. messageSends: ["tag:"],
  1262. referencedClasses: []
  1263. }),
  1264. smalltalk.HTMLCanvas);
  1265. smalltalk.addMethod(
  1266. smalltalk.method({
  1267. selector: "nav",
  1268. category: 'tags',
  1269. fn: function (){
  1270. var self=this;
  1271. return smalltalk.withContext(function($ctx1) {
  1272. var $1;
  1273. $1=self._tag_("nav");
  1274. return $1;
  1275. }, function($ctx1) {$ctx1.fill(self,"nav",{},smalltalk.HTMLCanvas)})},
  1276. args: [],
  1277. source: "nav\x0a\x09^self tag: 'nav'",
  1278. messageSends: ["tag:"],
  1279. referencedClasses: []
  1280. }),
  1281. smalltalk.HTMLCanvas);
  1282. smalltalk.addMethod(
  1283. smalltalk.method({
  1284. selector: "newTag:",
  1285. category: 'tags',
  1286. fn: function (aString){
  1287. var self=this;
  1288. function $TagBrush(){return smalltalk.TagBrush||(typeof TagBrush=="undefined"?nil:TagBrush)}
  1289. return smalltalk.withContext(function($ctx1) {
  1290. var $1;
  1291. $1=_st($TagBrush())._fromString_canvas_(aString,self);
  1292. return $1;
  1293. }, function($ctx1) {$ctx1.fill(self,"newTag:",{aString:aString},smalltalk.HTMLCanvas)})},
  1294. args: ["aString"],
  1295. source: "newTag: aString\x0a\x09^TagBrush fromString: aString canvas: self",
  1296. messageSends: ["fromString:canvas:"],
  1297. referencedClasses: ["TagBrush"]
  1298. }),
  1299. smalltalk.HTMLCanvas);
  1300. smalltalk.addMethod(
  1301. smalltalk.method({
  1302. selector: "noscript",
  1303. category: 'tags',
  1304. fn: function (){
  1305. var self=this;
  1306. return smalltalk.withContext(function($ctx1) {
  1307. var $1;
  1308. $1=self._tag_("noscript");
  1309. return $1;
  1310. }, function($ctx1) {$ctx1.fill(self,"noscript",{},smalltalk.HTMLCanvas)})},
  1311. args: [],
  1312. source: "noscript\x0a\x09^self tag: 'noscript'",
  1313. messageSends: ["tag:"],
  1314. referencedClasses: []
  1315. }),
  1316. smalltalk.HTMLCanvas);
  1317. smalltalk.addMethod(
  1318. smalltalk.method({
  1319. selector: "object",
  1320. category: 'tags',
  1321. fn: function (){
  1322. var self=this;
  1323. return smalltalk.withContext(function($ctx1) {
  1324. var $1;
  1325. $1=self._tag_("object");
  1326. return $1;
  1327. }, function($ctx1) {$ctx1.fill(self,"object",{},smalltalk.HTMLCanvas)})},
  1328. args: [],
  1329. source: "object\x0a\x09^self tag: 'object'",
  1330. messageSends: ["tag:"],
  1331. referencedClasses: []
  1332. }),
  1333. smalltalk.HTMLCanvas);
  1334. smalltalk.addMethod(
  1335. smalltalk.method({
  1336. selector: "ol",
  1337. category: 'tags',
  1338. fn: function (){
  1339. var self=this;
  1340. return smalltalk.withContext(function($ctx1) {
  1341. var $1;
  1342. $1=self._tag_("ol");
  1343. return $1;
  1344. }, function($ctx1) {$ctx1.fill(self,"ol",{},smalltalk.HTMLCanvas)})},
  1345. args: [],
  1346. source: "ol\x0a\x09^self tag: 'ol'",
  1347. messageSends: ["tag:"],
  1348. referencedClasses: []
  1349. }),
  1350. smalltalk.HTMLCanvas);
  1351. smalltalk.addMethod(
  1352. smalltalk.method({
  1353. selector: "ol:",
  1354. category: 'tags',
  1355. fn: function (anObject){
  1356. var self=this;
  1357. return smalltalk.withContext(function($ctx1) {
  1358. var $1;
  1359. $1=_st(self._ol())._with_(anObject);
  1360. return $1;
  1361. }, function($ctx1) {$ctx1.fill(self,"ol:",{anObject:anObject},smalltalk.HTMLCanvas)})},
  1362. args: ["anObject"],
  1363. source: "ol: anObject\x0a\x09^self ol with: anObject",
  1364. messageSends: ["with:", "ol"],
  1365. referencedClasses: []
  1366. }),
  1367. smalltalk.HTMLCanvas);
  1368. smalltalk.addMethod(
  1369. smalltalk.method({
  1370. selector: "optgroup",
  1371. category: 'tags',
  1372. fn: function (){
  1373. var self=this;
  1374. return smalltalk.withContext(function($ctx1) {
  1375. var $1;
  1376. $1=self._tag_("optgroup");
  1377. return $1;
  1378. }, function($ctx1) {$ctx1.fill(self,"optgroup",{},smalltalk.HTMLCanvas)})},
  1379. args: [],
  1380. source: "optgroup\x0a\x09^self tag: 'optgroup'",
  1381. messageSends: ["tag:"],
  1382. referencedClasses: []
  1383. }),
  1384. smalltalk.HTMLCanvas);
  1385. smalltalk.addMethod(
  1386. smalltalk.method({
  1387. selector: "option",
  1388. category: 'tags',
  1389. fn: function (){
  1390. var self=this;
  1391. return smalltalk.withContext(function($ctx1) {
  1392. var $1;
  1393. $1=self._tag_("option");
  1394. return $1;
  1395. }, function($ctx1) {$ctx1.fill(self,"option",{},smalltalk.HTMLCanvas)})},
  1396. args: [],
  1397. source: "option\x0a\x09^self tag: 'option'",
  1398. messageSends: ["tag:"],
  1399. referencedClasses: []
  1400. }),
  1401. smalltalk.HTMLCanvas);
  1402. smalltalk.addMethod(
  1403. smalltalk.method({
  1404. selector: "output",
  1405. category: 'tags',
  1406. fn: function (){
  1407. var self=this;
  1408. return smalltalk.withContext(function($ctx1) {
  1409. var $1;
  1410. $1=self._tag_("output");
  1411. return $1;
  1412. }, function($ctx1) {$ctx1.fill(self,"output",{},smalltalk.HTMLCanvas)})},
  1413. args: [],
  1414. source: "output\x0a\x09^self tag: 'output'",
  1415. messageSends: ["tag:"],
  1416. referencedClasses: []
  1417. }),
  1418. smalltalk.HTMLCanvas);
  1419. smalltalk.addMethod(
  1420. smalltalk.method({
  1421. selector: "p",
  1422. category: 'tags',
  1423. fn: function (){
  1424. var self=this;
  1425. return smalltalk.withContext(function($ctx1) {
  1426. var $1;
  1427. $1=self._tag_("p");
  1428. return $1;
  1429. }, function($ctx1) {$ctx1.fill(self,"p",{},smalltalk.HTMLCanvas)})},
  1430. args: [],
  1431. source: "p\x0a\x09^self tag: 'p'",
  1432. messageSends: ["tag:"],
  1433. referencedClasses: []
  1434. }),
  1435. smalltalk.HTMLCanvas);
  1436. smalltalk.addMethod(
  1437. smalltalk.method({
  1438. selector: "p:",
  1439. category: 'tags',
  1440. fn: function (anObject){
  1441. var self=this;
  1442. return smalltalk.withContext(function($ctx1) {
  1443. var $1;
  1444. $1=_st(self._p())._with_(anObject);
  1445. return $1;
  1446. }, function($ctx1) {$ctx1.fill(self,"p:",{anObject:anObject},smalltalk.HTMLCanvas)})},
  1447. args: ["anObject"],
  1448. source: "p: anObject\x0a\x09^self p with: anObject",
  1449. messageSends: ["with:", "p"],
  1450. referencedClasses: []
  1451. }),
  1452. smalltalk.HTMLCanvas);
  1453. smalltalk.addMethod(
  1454. smalltalk.method({
  1455. selector: "param",
  1456. category: 'tags',
  1457. fn: function (){
  1458. var self=this;
  1459. return smalltalk.withContext(function($ctx1) {
  1460. var $1;
  1461. $1=self._tag_("param");
  1462. return $1;
  1463. }, function($ctx1) {$ctx1.fill(self,"param",{},smalltalk.HTMLCanvas)})},
  1464. args: [],
  1465. source: "param\x0a\x09^self tag: 'param'",
  1466. messageSends: ["tag:"],
  1467. referencedClasses: []
  1468. }),
  1469. smalltalk.HTMLCanvas);
  1470. smalltalk.addMethod(
  1471. smalltalk.method({
  1472. selector: "pre",
  1473. category: 'tags',
  1474. fn: function (){
  1475. var self=this;
  1476. return smalltalk.withContext(function($ctx1) {
  1477. var $1;
  1478. $1=self._tag_("pre");
  1479. return $1;
  1480. }, function($ctx1) {$ctx1.fill(self,"pre",{},smalltalk.HTMLCanvas)})},
  1481. args: [],
  1482. source: "pre\x0a\x09^self tag: 'pre'",
  1483. messageSends: ["tag:"],
  1484. referencedClasses: []
  1485. }),
  1486. smalltalk.HTMLCanvas);
  1487. smalltalk.addMethod(
  1488. smalltalk.method({
  1489. selector: "progress",
  1490. category: 'tags',
  1491. fn: function (){
  1492. var self=this;
  1493. return smalltalk.withContext(function($ctx1) {
  1494. var $1;
  1495. $1=self._tag_("progress");
  1496. return $1;
  1497. }, function($ctx1) {$ctx1.fill(self,"progress",{},smalltalk.HTMLCanvas)})},
  1498. args: [],
  1499. source: "progress\x0a\x09^self tag: 'progress'",
  1500. messageSends: ["tag:"],
  1501. referencedClasses: []
  1502. }),
  1503. smalltalk.HTMLCanvas);
  1504. smalltalk.addMethod(
  1505. smalltalk.method({
  1506. selector: "root",
  1507. category: 'accessing',
  1508. fn: function (){
  1509. var self=this;
  1510. return smalltalk.withContext(function($ctx1) {
  1511. var $1;
  1512. $1=self["@root"];
  1513. return $1;
  1514. }, function($ctx1) {$ctx1.fill(self,"root",{},smalltalk.HTMLCanvas)})},
  1515. args: [],
  1516. source: "root\x0a\x09^root",
  1517. messageSends: [],
  1518. referencedClasses: []
  1519. }),
  1520. smalltalk.HTMLCanvas);
  1521. smalltalk.addMethod(
  1522. smalltalk.method({
  1523. selector: "root:",
  1524. category: 'accessing',
  1525. fn: function (aTagBrush){
  1526. var self=this;
  1527. return smalltalk.withContext(function($ctx1) {
  1528. self["@root"]=aTagBrush;
  1529. return self}, function($ctx1) {$ctx1.fill(self,"root:",{aTagBrush:aTagBrush},smalltalk.HTMLCanvas)})},
  1530. args: ["aTagBrush"],
  1531. source: "root: aTagBrush\x0a\x09root := aTagBrush",
  1532. messageSends: [],
  1533. referencedClasses: []
  1534. }),
  1535. smalltalk.HTMLCanvas);
  1536. smalltalk.addMethod(
  1537. smalltalk.method({
  1538. selector: "script",
  1539. category: 'tags',
  1540. fn: function (){
  1541. var self=this;
  1542. return smalltalk.withContext(function($ctx1) {
  1543. var $1;
  1544. $1=self._tag_("script");
  1545. return $1;
  1546. }, function($ctx1) {$ctx1.fill(self,"script",{},smalltalk.HTMLCanvas)})},
  1547. args: [],
  1548. source: "script\x0a\x09^self tag: 'script'",
  1549. messageSends: ["tag:"],
  1550. referencedClasses: []
  1551. }),
  1552. smalltalk.HTMLCanvas);
  1553. smalltalk.addMethod(
  1554. smalltalk.method({
  1555. selector: "section",
  1556. category: 'tags',
  1557. fn: function (){
  1558. var self=this;
  1559. return smalltalk.withContext(function($ctx1) {
  1560. var $1;
  1561. $1=self._tag_("section");
  1562. return $1;
  1563. }, function($ctx1) {$ctx1.fill(self,"section",{},smalltalk.HTMLCanvas)})},
  1564. args: [],
  1565. source: "section\x0a\x09^self tag: 'section'",
  1566. messageSends: ["tag:"],
  1567. referencedClasses: []
  1568. }),
  1569. smalltalk.HTMLCanvas);
  1570. smalltalk.addMethod(
  1571. smalltalk.method({
  1572. selector: "select",
  1573. category: 'tags',
  1574. fn: function (){
  1575. var self=this;
  1576. return smalltalk.withContext(function($ctx1) {
  1577. var $1;
  1578. $1=self._tag_("select");
  1579. return $1;
  1580. }, function($ctx1) {$ctx1.fill(self,"select",{},smalltalk.HTMLCanvas)})},
  1581. args: [],
  1582. source: "select\x0a\x09^self tag: 'select'",
  1583. messageSends: ["tag:"],
  1584. referencedClasses: []
  1585. }),
  1586. smalltalk.HTMLCanvas);
  1587. smalltalk.addMethod(
  1588. smalltalk.method({
  1589. selector: "small",
  1590. category: 'tags',
  1591. fn: function (){
  1592. var self=this;
  1593. return smalltalk.withContext(function($ctx1) {
  1594. var $1;
  1595. $1=self._tag_("small");
  1596. return $1;
  1597. }, function($ctx1) {$ctx1.fill(self,"small",{},smalltalk.HTMLCanvas)})},
  1598. args: [],
  1599. source: "small\x0a\x09^self tag: 'small'",
  1600. messageSends: ["tag:"],
  1601. referencedClasses: []
  1602. }),
  1603. smalltalk.HTMLCanvas);
  1604. smalltalk.addMethod(
  1605. smalltalk.method({
  1606. selector: "snippet:",
  1607. category: 'accessing',
  1608. fn: function (anElement){
  1609. var self=this;
  1610. var clone,caret;
  1611. function $TagBrush(){return smalltalk.TagBrush||(typeof TagBrush=="undefined"?nil:TagBrush)}
  1612. return smalltalk.withContext(function($ctx1) {
  1613. var $1,$2,$3;
  1614. clone=_st(_st(anElement)._asJQuery())._clone();
  1615. $1=_st($TagBrush())._fromJQuery_canvas_(clone,self);
  1616. $ctx1.sendIdx["fromJQuery:canvas:"]=1;
  1617. self._with_($1);
  1618. caret=_st(clone)._find_("[data-snippet=\x22*\x22]");
  1619. $2=_st(_st(caret)._toArray())._isEmpty();
  1620. if(smalltalk.assert($2)){
  1621. caret=clone;
  1622. caret;
  1623. };
  1624. $3=_st($TagBrush())._fromJQuery_canvas_(_st(caret)._removeAttr_("data-snippet"),self);
  1625. return $3;
  1626. }, function($ctx1) {$ctx1.fill(self,"snippet:",{anElement:anElement,clone:clone,caret:caret},smalltalk.HTMLCanvas)})},
  1627. args: ["anElement"],
  1628. source: "snippet: anElement\x0a\x09\x22Adds clone of anElement, finds [data-snippet=\x22\x22*\x22\x22] subelement\x0a\x09and returns TagBrush as if that subelement was just added.\x0a\x09\x0a\x09Rarely needed to use directly, use `html foo` dynamically installed method\x0a\x09for a snippet named foo.\x22\x0a\x09\x0a\x09| clone caret |\x0a\x09\x0a\x09clone := anElement asJQuery clone.\x0a\x09self with: (TagBrush fromJQuery: clone canvas: self).\x0a\x09caret := clone find: '[data-snippet=\x22*\x22]'.\x0a\x09caret toArray isEmpty ifTrue: [ caret := clone ].\x0a\x09^TagBrush fromJQuery: (caret removeAttr: 'data-snippet') canvas: self",
  1629. messageSends: ["clone", "asJQuery", "with:", "fromJQuery:canvas:", "find:", "ifTrue:", "isEmpty", "toArray", "removeAttr:"],
  1630. referencedClasses: ["TagBrush"]
  1631. }),
  1632. smalltalk.HTMLCanvas);
  1633. smalltalk.addMethod(
  1634. smalltalk.method({
  1635. selector: "source",
  1636. category: 'tags',
  1637. fn: function (){
  1638. var self=this;
  1639. return smalltalk.withContext(function($ctx1) {
  1640. var $1;
  1641. $1=self._tag_("source");
  1642. return $1;
  1643. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.HTMLCanvas)})},
  1644. args: [],
  1645. source: "source\x0a\x09^self tag: 'source'",
  1646. messageSends: ["tag:"],
  1647. referencedClasses: []
  1648. }),
  1649. smalltalk.HTMLCanvas);
  1650. smalltalk.addMethod(
  1651. smalltalk.method({
  1652. selector: "span",
  1653. category: 'tags',
  1654. fn: function (){
  1655. var self=this;
  1656. return smalltalk.withContext(function($ctx1) {
  1657. var $1;
  1658. $1=self._tag_("span");
  1659. return $1;
  1660. }, function($ctx1) {$ctx1.fill(self,"span",{},smalltalk.HTMLCanvas)})},
  1661. args: [],
  1662. source: "span\x0a\x09^self tag: 'span'",
  1663. messageSends: ["tag:"],
  1664. referencedClasses: []
  1665. }),
  1666. smalltalk.HTMLCanvas);
  1667. smalltalk.addMethod(
  1668. smalltalk.method({
  1669. selector: "span:",
  1670. category: 'tags',
  1671. fn: function (anObject){
  1672. var self=this;
  1673. return smalltalk.withContext(function($ctx1) {
  1674. var $1;
  1675. $1=_st(self._span())._with_(anObject);
  1676. return $1;
  1677. }, function($ctx1) {$ctx1.fill(self,"span:",{anObject:anObject},smalltalk.HTMLCanvas)})},
  1678. args: ["anObject"],
  1679. source: "span: anObject\x0a\x09^self span with: anObject",
  1680. messageSends: ["with:", "span"],
  1681. referencedClasses: []
  1682. }),
  1683. smalltalk.HTMLCanvas);
  1684. smalltalk.addMethod(
  1685. smalltalk.method({
  1686. selector: "strong",
  1687. category: 'tags',
  1688. fn: function (){
  1689. var self=this;
  1690. return smalltalk.withContext(function($ctx1) {
  1691. var $1;
  1692. $1=self._tag_("strong");
  1693. return $1;
  1694. }, function($ctx1) {$ctx1.fill(self,"strong",{},smalltalk.HTMLCanvas)})},
  1695. args: [],
  1696. source: "strong\x0a\x09^self tag: 'strong'",
  1697. messageSends: ["tag:"],
  1698. referencedClasses: []
  1699. }),
  1700. smalltalk.HTMLCanvas);
  1701. smalltalk.addMethod(
  1702. smalltalk.method({
  1703. selector: "strong:",
  1704. category: 'tags',
  1705. fn: function (anObject){
  1706. var self=this;
  1707. return smalltalk.withContext(function($ctx1) {
  1708. var $1;
  1709. $1=_st(self._strong())._with_(anObject);
  1710. return $1;
  1711. }, function($ctx1) {$ctx1.fill(self,"strong:",{anObject:anObject},smalltalk.HTMLCanvas)})},
  1712. args: ["anObject"],
  1713. source: "strong: anObject\x0a\x09^self strong with: anObject",
  1714. messageSends: ["with:", "strong"],
  1715. referencedClasses: []
  1716. }),
  1717. smalltalk.HTMLCanvas);
  1718. smalltalk.addMethod(
  1719. smalltalk.method({
  1720. selector: "style",
  1721. category: 'tags',
  1722. fn: function (){
  1723. var self=this;
  1724. function $StyleTag(){return smalltalk.StyleTag||(typeof StyleTag=="undefined"?nil:StyleTag)}
  1725. return smalltalk.withContext(function($ctx1) {
  1726. var $1;
  1727. $1=_st(self["@root"])._addBrush_(_st($StyleTag())._canvas_(self));
  1728. return $1;
  1729. }, function($ctx1) {$ctx1.fill(self,"style",{},smalltalk.HTMLCanvas)})},
  1730. args: [],
  1731. source: "style\x0a\x09^ root addBrush: (StyleTag canvas: self)",
  1732. messageSends: ["addBrush:", "canvas:"],
  1733. referencedClasses: ["StyleTag"]
  1734. }),
  1735. smalltalk.HTMLCanvas);
  1736. smalltalk.addMethod(
  1737. smalltalk.method({
  1738. selector: "style:",
  1739. category: 'tags',
  1740. fn: function (aString){
  1741. var self=this;
  1742. return smalltalk.withContext(function($ctx1) {
  1743. var $2,$3,$1;
  1744. $2=self._style();
  1745. _st($2)._with_(aString);
  1746. $3=_st($2)._yourself();
  1747. $1=$3;
  1748. return $1;
  1749. }, function($ctx1) {$ctx1.fill(self,"style:",{aString:aString},smalltalk.HTMLCanvas)})},
  1750. args: ["aString"],
  1751. source: "style: aString\x0a\x09^ self style with: aString; yourself",
  1752. messageSends: ["with:", "style", "yourself"],
  1753. referencedClasses: []
  1754. }),
  1755. smalltalk.HTMLCanvas);
  1756. smalltalk.addMethod(
  1757. smalltalk.method({
  1758. selector: "sub",
  1759. category: 'tags',
  1760. fn: function (){
  1761. var self=this;
  1762. return smalltalk.withContext(function($ctx1) {
  1763. var $1;
  1764. $1=self._tag_("sub");
  1765. return $1;
  1766. }, function($ctx1) {$ctx1.fill(self,"sub",{},smalltalk.HTMLCanvas)})},
  1767. args: [],
  1768. source: "sub\x0a\x09^self tag: 'sub'",
  1769. messageSends: ["tag:"],
  1770. referencedClasses: []
  1771. }),
  1772. smalltalk.HTMLCanvas);
  1773. smalltalk.addMethod(
  1774. smalltalk.method({
  1775. selector: "summary",
  1776. category: 'tags',
  1777. fn: function (){
  1778. var self=this;
  1779. return smalltalk.withContext(function($ctx1) {
  1780. var $1;
  1781. $1=self._tag_("summary");
  1782. return $1;
  1783. }, function($ctx1) {$ctx1.fill(self,"summary",{},smalltalk.HTMLCanvas)})},
  1784. args: [],
  1785. source: "summary\x0a\x09^self tag: 'summary'",
  1786. messageSends: ["tag:"],
  1787. referencedClasses: []
  1788. }),
  1789. smalltalk.HTMLCanvas);
  1790. smalltalk.addMethod(
  1791. smalltalk.method({
  1792. selector: "sup",
  1793. category: 'tags',
  1794. fn: function (){
  1795. var self=this;
  1796. return smalltalk.withContext(function($ctx1) {
  1797. var $1;
  1798. $1=self._tag_("sup");
  1799. return $1;
  1800. }, function($ctx1) {$ctx1.fill(self,"sup",{},smalltalk.HTMLCanvas)})},
  1801. args: [],
  1802. source: "sup\x0a\x09^self tag: 'sup'",
  1803. messageSends: ["tag:"],
  1804. referencedClasses: []
  1805. }),
  1806. smalltalk.HTMLCanvas);
  1807. smalltalk.addMethod(
  1808. smalltalk.method({
  1809. selector: "table",
  1810. category: 'tags',
  1811. fn: function (){
  1812. var self=this;
  1813. return smalltalk.withContext(function($ctx1) {
  1814. var $1;
  1815. $1=self._tag_("table");
  1816. return $1;
  1817. }, function($ctx1) {$ctx1.fill(self,"table",{},smalltalk.HTMLCanvas)})},
  1818. args: [],
  1819. source: "table\x0a\x09^self tag: 'table'",
  1820. messageSends: ["tag:"],
  1821. referencedClasses: []
  1822. }),
  1823. smalltalk.HTMLCanvas);
  1824. smalltalk.addMethod(
  1825. smalltalk.method({
  1826. selector: "tag:",
  1827. category: 'tags',
  1828. fn: function (aString){
  1829. var self=this;
  1830. return smalltalk.withContext(function($ctx1) {
  1831. var $1;
  1832. $1=_st(self["@root"])._addBrush_(self._newTag_(aString));
  1833. return $1;
  1834. }, function($ctx1) {$ctx1.fill(self,"tag:",{aString:aString},smalltalk.HTMLCanvas)})},
  1835. args: ["aString"],
  1836. source: "tag: aString\x0a\x09^root addBrush: (self newTag: aString)",
  1837. messageSends: ["addBrush:", "newTag:"],
  1838. referencedClasses: []
  1839. }),
  1840. smalltalk.HTMLCanvas);
  1841. smalltalk.addMethod(
  1842. smalltalk.method({
  1843. selector: "tbody",
  1844. category: 'tags',
  1845. fn: function (){
  1846. var self=this;
  1847. return smalltalk.withContext(function($ctx1) {
  1848. var $1;
  1849. $1=self._tag_("tbody");
  1850. return $1;
  1851. }, function($ctx1) {$ctx1.fill(self,"tbody",{},smalltalk.HTMLCanvas)})},
  1852. args: [],
  1853. source: "tbody\x0a\x09^self tag: 'tbody'",
  1854. messageSends: ["tag:"],
  1855. referencedClasses: []
  1856. }),
  1857. smalltalk.HTMLCanvas);
  1858. smalltalk.addMethod(
  1859. smalltalk.method({
  1860. selector: "td",
  1861. category: 'tags',
  1862. fn: function (){
  1863. var self=this;
  1864. return smalltalk.withContext(function($ctx1) {
  1865. var $1;
  1866. $1=self._tag_("td");
  1867. return $1;
  1868. }, function($ctx1) {$ctx1.fill(self,"td",{},smalltalk.HTMLCanvas)})},
  1869. args: [],
  1870. source: "td\x0a\x09^self tag: 'td'",
  1871. messageSends: ["tag:"],
  1872. referencedClasses: []
  1873. }),
  1874. smalltalk.HTMLCanvas);
  1875. smalltalk.addMethod(
  1876. smalltalk.method({
  1877. selector: "textarea",
  1878. category: 'tags',
  1879. fn: function (){
  1880. var self=this;
  1881. return smalltalk.withContext(function($ctx1) {
  1882. var $1;
  1883. $1=self._tag_("textarea");
  1884. return $1;
  1885. }, function($ctx1) {$ctx1.fill(self,"textarea",{},smalltalk.HTMLCanvas)})},
  1886. args: [],
  1887. source: "textarea\x0a\x09^self tag: 'textarea'",
  1888. messageSends: ["tag:"],
  1889. referencedClasses: []
  1890. }),
  1891. smalltalk.HTMLCanvas);
  1892. smalltalk.addMethod(
  1893. smalltalk.method({
  1894. selector: "tfoot",
  1895. category: 'tags',
  1896. fn: function (){
  1897. var self=this;
  1898. return smalltalk.withContext(function($ctx1) {
  1899. var $1;
  1900. $1=self._tag_("tfoot");
  1901. return $1;
  1902. }, function($ctx1) {$ctx1.fill(self,"tfoot",{},smalltalk.HTMLCanvas)})},
  1903. args: [],
  1904. source: "tfoot\x0a\x09^self tag: 'tfoot'",
  1905. messageSends: ["tag:"],
  1906. referencedClasses: []
  1907. }),
  1908. smalltalk.HTMLCanvas);
  1909. smalltalk.addMethod(
  1910. smalltalk.method({
  1911. selector: "th",
  1912. category: 'tags',
  1913. fn: function (){
  1914. var self=this;
  1915. return smalltalk.withContext(function($ctx1) {
  1916. var $1;
  1917. $1=self._tag_("th");
  1918. return $1;
  1919. }, function($ctx1) {$ctx1.fill(self,"th",{},smalltalk.HTMLCanvas)})},
  1920. args: [],
  1921. source: "th\x0a\x09^self tag: 'th'",
  1922. messageSends: ["tag:"],
  1923. referencedClasses: []
  1924. }),
  1925. smalltalk.HTMLCanvas);
  1926. smalltalk.addMethod(
  1927. smalltalk.method({
  1928. selector: "thead",
  1929. category: 'tags',
  1930. fn: function (){
  1931. var self=this;
  1932. return smalltalk.withContext(function($ctx1) {
  1933. var $1;
  1934. $1=self._tag_("thead");
  1935. return $1;
  1936. }, function($ctx1) {$ctx1.fill(self,"thead",{},smalltalk.HTMLCanvas)})},
  1937. args: [],
  1938. source: "thead\x0a\x09^self tag: 'thead'",
  1939. messageSends: ["tag:"],
  1940. referencedClasses: []
  1941. }),
  1942. smalltalk.HTMLCanvas);
  1943. smalltalk.addMethod(
  1944. smalltalk.method({
  1945. selector: "time",
  1946. category: 'tags',
  1947. fn: function (){
  1948. var self=this;
  1949. return smalltalk.withContext(function($ctx1) {
  1950. var $1;
  1951. $1=self._tag_("time");
  1952. return $1;
  1953. }, function($ctx1) {$ctx1.fill(self,"time",{},smalltalk.HTMLCanvas)})},
  1954. args: [],
  1955. source: "time\x0a\x09^self tag: 'time'",
  1956. messageSends: ["tag:"],
  1957. referencedClasses: []
  1958. }),
  1959. smalltalk.HTMLCanvas);
  1960. smalltalk.addMethod(
  1961. smalltalk.method({
  1962. selector: "title",
  1963. category: 'tags',
  1964. fn: function (){
  1965. var self=this;
  1966. return smalltalk.withContext(function($ctx1) {
  1967. var $1;
  1968. $1=self._tag_("title");
  1969. return $1;
  1970. }, function($ctx1) {$ctx1.fill(self,"title",{},smalltalk.HTMLCanvas)})},
  1971. args: [],
  1972. source: "title\x0a\x09^self tag: 'title'",
  1973. messageSends: ["tag:"],
  1974. referencedClasses: []
  1975. }),
  1976. smalltalk.HTMLCanvas);
  1977. smalltalk.addMethod(
  1978. smalltalk.method({
  1979. selector: "tr",
  1980. category: 'tags',
  1981. fn: function (){
  1982. var self=this;
  1983. return smalltalk.withContext(function($ctx1) {
  1984. var $1;
  1985. $1=self._tag_("tr");
  1986. return $1;
  1987. }, function($ctx1) {$ctx1.fill(self,"tr",{},smalltalk.HTMLCanvas)})},
  1988. args: [],
  1989. source: "tr\x0a\x09^self tag: 'tr'",
  1990. messageSends: ["tag:"],
  1991. referencedClasses: []
  1992. }),
  1993. smalltalk.HTMLCanvas);
  1994. smalltalk.addMethod(
  1995. smalltalk.method({
  1996. selector: "ul",
  1997. category: 'tags',
  1998. fn: function (){
  1999. var self=this;
  2000. return smalltalk.withContext(function($ctx1) {
  2001. var $1;
  2002. $1=self._tag_("ul");
  2003. return $1;
  2004. }, function($ctx1) {$ctx1.fill(self,"ul",{},smalltalk.HTMLCanvas)})},
  2005. args: [],
  2006. source: "ul\x0a\x09^self tag: 'ul'",
  2007. messageSends: ["tag:"],
  2008. referencedClasses: []
  2009. }),
  2010. smalltalk.HTMLCanvas);
  2011. smalltalk.addMethod(
  2012. smalltalk.method({
  2013. selector: "ul:",
  2014. category: 'tags',
  2015. fn: function (anObject){
  2016. var self=this;
  2017. return smalltalk.withContext(function($ctx1) {
  2018. var $1;
  2019. $1=_st(self._ul())._with_(anObject);
  2020. return $1;
  2021. }, function($ctx1) {$ctx1.fill(self,"ul:",{anObject:anObject},smalltalk.HTMLCanvas)})},
  2022. args: ["anObject"],
  2023. source: "ul: anObject\x0a\x09^self ul with: anObject",
  2024. messageSends: ["with:", "ul"],
  2025. referencedClasses: []
  2026. }),
  2027. smalltalk.HTMLCanvas);
  2028. smalltalk.addMethod(
  2029. smalltalk.method({
  2030. selector: "video",
  2031. category: 'tags',
  2032. fn: function (){
  2033. var self=this;
  2034. return smalltalk.withContext(function($ctx1) {
  2035. var $1;
  2036. $1=self._tag_("video");
  2037. return $1;
  2038. }, function($ctx1) {$ctx1.fill(self,"video",{},smalltalk.HTMLCanvas)})},
  2039. args: [],
  2040. source: "video\x0a\x09^self tag: 'video'",
  2041. messageSends: ["tag:"],
  2042. referencedClasses: []
  2043. }),
  2044. smalltalk.HTMLCanvas);
  2045. smalltalk.addMethod(
  2046. smalltalk.method({
  2047. selector: "with:",
  2048. category: 'adding',
  2049. fn: function (anObject){
  2050. var self=this;
  2051. return smalltalk.withContext(function($ctx1) {
  2052. var $1;
  2053. $1=_st(self._root())._with_(anObject);
  2054. return $1;
  2055. }, function($ctx1) {$ctx1.fill(self,"with:",{anObject:anObject},smalltalk.HTMLCanvas)})},
  2056. args: ["anObject"],
  2057. source: "with: anObject\x0a\x09^self root with: anObject",
  2058. messageSends: ["with:", "root"],
  2059. referencedClasses: []
  2060. }),
  2061. smalltalk.HTMLCanvas);
  2062. smalltalk.addMethod(
  2063. smalltalk.method({
  2064. selector: "browserVersion",
  2065. category: 'instance creation',
  2066. fn: function (){
  2067. var self=this;
  2068. return smalltalk.withContext(function($ctx1) {
  2069. var $1;
  2070. $1=_st(_st(jQuery)._at_("browser"))._version();
  2071. return $1;
  2072. }, function($ctx1) {$ctx1.fill(self,"browserVersion",{},smalltalk.HTMLCanvas.klass)})},
  2073. args: [],
  2074. source: "browserVersion\x0a\x09^(jQuery at: #browser) version",
  2075. messageSends: ["version", "at:"],
  2076. referencedClasses: []
  2077. }),
  2078. smalltalk.HTMLCanvas.klass);
  2079. smalltalk.addMethod(
  2080. smalltalk.method({
  2081. selector: "isMSIE",
  2082. category: 'instance creation',
  2083. fn: function (){
  2084. var self=this;
  2085. return smalltalk.withContext(function($ctx1) {
  2086. var $2,$1;
  2087. $2=_st(_st(jQuery)._at_("browser"))._at_("msie");
  2088. $ctx1.sendIdx["at:"]=1;
  2089. $1=_st($2)._notNil();
  2090. return $1;
  2091. }, function($ctx1) {$ctx1.fill(self,"isMSIE",{},smalltalk.HTMLCanvas.klass)})},
  2092. args: [],
  2093. source: "isMSIE\x0a\x09^((jQuery at: #browser) at: #msie) notNil",
  2094. messageSends: ["notNil", "at:"],
  2095. referencedClasses: []
  2096. }),
  2097. smalltalk.HTMLCanvas.klass);
  2098. smalltalk.addMethod(
  2099. smalltalk.method({
  2100. selector: "isMozilla",
  2101. category: 'instance creation',
  2102. fn: function (){
  2103. var self=this;
  2104. return smalltalk.withContext(function($ctx1) {
  2105. var $2,$1;
  2106. $2=_st(_st(jQuery)._at_("browser"))._at_("mozilla");
  2107. $ctx1.sendIdx["at:"]=1;
  2108. $1=_st($2)._notNil();
  2109. return $1;
  2110. }, function($ctx1) {$ctx1.fill(self,"isMozilla",{},smalltalk.HTMLCanvas.klass)})},
  2111. args: [],
  2112. source: "isMozilla\x0a\x09^((jQuery at: #browser) at: #mozilla) notNil",
  2113. messageSends: ["notNil", "at:"],
  2114. referencedClasses: []
  2115. }),
  2116. smalltalk.HTMLCanvas.klass);
  2117. smalltalk.addMethod(
  2118. smalltalk.method({
  2119. selector: "isOpera",
  2120. category: 'instance creation',
  2121. fn: function (){
  2122. var self=this;
  2123. return smalltalk.withContext(function($ctx1) {
  2124. var $2,$1;
  2125. $2=_st(_st(jQuery)._at_("browser"))._at_("opera");
  2126. $ctx1.sendIdx["at:"]=1;
  2127. $1=_st($2)._notNil();
  2128. return $1;
  2129. }, function($ctx1) {$ctx1.fill(self,"isOpera",{},smalltalk.HTMLCanvas.klass)})},
  2130. args: [],
  2131. source: "isOpera\x0a\x09^((jQuery at: #browser) at: #opera) notNil",
  2132. messageSends: ["notNil", "at:"],
  2133. referencedClasses: []
  2134. }),
  2135. smalltalk.HTMLCanvas.klass);
  2136. smalltalk.addMethod(
  2137. smalltalk.method({
  2138. selector: "isWebkit",
  2139. category: 'instance creation',
  2140. fn: function (){
  2141. var self=this;
  2142. return smalltalk.withContext(function($ctx1) {
  2143. var $2,$1;
  2144. $2=_st(_st(jQuery)._at_("browser"))._at_("webkit");
  2145. $ctx1.sendIdx["at:"]=1;
  2146. $1=_st($2)._notNil();
  2147. return $1;
  2148. }, function($ctx1) {$ctx1.fill(self,"isWebkit",{},smalltalk.HTMLCanvas.klass)})},
  2149. args: [],
  2150. source: "isWebkit\x0a\x09^((jQuery at: #browser) at: #webkit) notNil",
  2151. messageSends: ["notNil", "at:"],
  2152. referencedClasses: []
  2153. }),
  2154. smalltalk.HTMLCanvas.klass);
  2155. smalltalk.addMethod(
  2156. smalltalk.method({
  2157. selector: "onJQuery:",
  2158. category: 'instance creation',
  2159. fn: function (aJQuery){
  2160. var self=this;
  2161. return smalltalk.withContext(function($ctx1) {
  2162. var $2,$3,$1;
  2163. $2=self._basicNew();
  2164. _st($2)._initializeFromJQuery_(aJQuery);
  2165. _st($2)._initialize();
  2166. $3=_st($2)._yourself();
  2167. $1=$3;
  2168. return $1;
  2169. }, function($ctx1) {$ctx1.fill(self,"onJQuery:",{aJQuery:aJQuery},smalltalk.HTMLCanvas.klass)})},
  2170. args: ["aJQuery"],
  2171. source: "onJQuery: aJQuery\x0a\x09^self basicNew\x0a\x09\x09initializeFromJQuery: aJQuery;\x0a\x09\x09initialize;\x0a\x09\x09yourself",
  2172. messageSends: ["initializeFromJQuery:", "basicNew", "initialize", "yourself"],
  2173. referencedClasses: []
  2174. }),
  2175. smalltalk.HTMLCanvas.klass);
  2176. smalltalk.addClass('HTMLSnippet', smalltalk.Object, ['snippets'], 'Canvas');
  2177. smalltalk.HTMLSnippet.comment="My sole instance is the registry of html snippets.\x0a`HTMLSnippet current` is the public singleton instance.\x0a\x0aOn startup, it scans the document for any html elements\x0awith `'data-snippet=\x22foo\x22'` attribute and takes them off the document,\x0aremembering them in the store under the specified name.\x0aIt also install method #foo into HTMLCanvas dynamically.\x0a\x0aEvery html snippet should mark a 'caret', a place where contents\x0acan be inserted, by 'data-snippet=\x22*\x22' (a special name for caret).\x0aFor example:\x0a\x0a`<li data-snippet='menuelement' class='...'><a data-snippet='*'></a></li>`\x0a\x0adefines a list element with a link inside; the link itself is marked as a caret.\x0a\x0aYou can later issue\x0a\x0a`html menuelement href: '/foo'; with: 'A foo'`\x0a\x0ato insert the whole snippet and directly manipulate the caret, so it renders:\x0a\x0a`<li class='...'><a href='/foo'>A foo</a></li>`\x0a\x0aFor a self-careting tags (not very useful, but you do not need to fill class etc.\x0ayou can use\x0a\x0a`<div class='lots of classes' attr1='one' attr2='two' data-snippet='*bar'></div>`\x0a\x0aand in code later do:\x0a\x0a`html bar with: [ xxx ]`\x0a\x0ato render\x0a\x0a`<div class='lots of classes' attr1='one' attr2='two'>...added by xxx...</div>`";
  2178. smalltalk.addMethod(
  2179. smalltalk.method({
  2180. selector: "initializeFromJQuery:",
  2181. category: 'initialization',
  2182. fn: function (aJQuery){
  2183. var self=this;
  2184. return smalltalk.withContext(function($ctx1) {
  2185. _st(self._snippetsFromJQuery_(aJQuery))._do_((function(each){
  2186. return smalltalk.withContext(function($ctx2) {
  2187. return self._installSnippetFromJQuery_(_st(each)._asJQuery());
  2188. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  2189. return self}, function($ctx1) {$ctx1.fill(self,"initializeFromJQuery:",{aJQuery:aJQuery},smalltalk.HTMLSnippet)})},
  2190. args: ["aJQuery"],
  2191. source: "initializeFromJQuery: aJQuery\x0a\x09\x22Finds and takes out all snippets out of aJQuery.\x0a\x09Installs it into self.\x22\x0a\x09\x0a\x09(self snippetsFromJQuery: aJQuery) do: [ :each |\x0a\x09\x09self installSnippetFromJQuery: each asJQuery ]",
  2192. messageSends: ["do:", "snippetsFromJQuery:", "installSnippetFromJQuery:", "asJQuery"],
  2193. referencedClasses: []
  2194. }),
  2195. smalltalk.HTMLSnippet);
  2196. smalltalk.addMethod(
  2197. smalltalk.method({
  2198. selector: "installSnippetFromJQuery:",
  2199. category: 'snippet installation',
  2200. fn: function (element){
  2201. var self=this;
  2202. var name;
  2203. return smalltalk.withContext(function($ctx1) {
  2204. var $1,$2;
  2205. name=_st(element)._attr_("data-snippet");
  2206. $1=_st(name).__eq("*");
  2207. if(! smalltalk.assert($1)){
  2208. $2=_st("^\x5c*"._asRegexp())._test_(name);
  2209. if(smalltalk.assert($2)){
  2210. name=_st(name)._allButFirst();
  2211. name;
  2212. _st(element)._attr_put_("data-snippet","*");
  2213. } else {
  2214. _st(element)._removeAttr_("data-snippet");
  2215. };
  2216. self._snippetAt_install_(name,_st(_st(element)._detach())._get_((0)));
  2217. };
  2218. return self}, function($ctx1) {$ctx1.fill(self,"installSnippetFromJQuery:",{element:element,name:name},smalltalk.HTMLSnippet)})},
  2219. args: ["element"],
  2220. source: "installSnippetFromJQuery: element\x0a\x09| name |\x0a\x09name := element attr: 'data-snippet'.\x0a\x09name = '*' ifFalse: [\x0a\x09\x09('^\x5c*' asRegexp test: name)\x0a\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09name := name allButFirst.\x0a\x09\x09\x09\x09element attr: 'data-snippet' put: '*' ]\x0a\x09\x09\x09ifFalse: [\x0a\x09\x09\x09\x09element removeAttr: 'data-snippet' ].\x0a\x09\x09self snippetAt: name install: (element detach get: 0) ]",
  2221. messageSends: ["attr:", "ifFalse:", "=", "ifTrue:ifFalse:", "test:", "asRegexp", "allButFirst", "attr:put:", "removeAttr:", "snippetAt:install:", "get:", "detach"],
  2222. referencedClasses: []
  2223. }),
  2224. smalltalk.HTMLSnippet);
  2225. smalltalk.addMethod(
  2226. smalltalk.method({
  2227. selector: "snippetAt:",
  2228. category: 'accessing',
  2229. fn: function (aString){
  2230. var self=this;
  2231. return smalltalk.withContext(function($ctx1) {
  2232. var $1;
  2233. $1=_st(self._snippets())._at_(aString);
  2234. return $1;
  2235. }, function($ctx1) {$ctx1.fill(self,"snippetAt:",{aString:aString},smalltalk.HTMLSnippet)})},
  2236. args: ["aString"],
  2237. source: "snippetAt: aString\x0a\x09^ self snippets at: aString",
  2238. messageSends: ["at:", "snippets"],
  2239. referencedClasses: []
  2240. }),
  2241. smalltalk.HTMLSnippet);
  2242. smalltalk.addMethod(
  2243. smalltalk.method({
  2244. selector: "snippetAt:compile:",
  2245. category: 'method generation',
  2246. fn: function (aString,anElement){
  2247. var self=this;
  2248. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2249. function $HTMLCanvas(){return smalltalk.HTMLCanvas||(typeof HTMLCanvas=="undefined"?nil:HTMLCanvas)}
  2250. return smalltalk.withContext(function($ctx1) {
  2251. _st(_st($ClassBuilder())._new())._installMethod_forClass_category_(_st(_st((function(htmlReceiver){
  2252. return smalltalk.withContext(function($ctx2) {
  2253. return _st(htmlReceiver)._snippet_(anElement);
  2254. }, function($ctx2) {$ctx2.fillBlock({htmlReceiver:htmlReceiver},$ctx1,1)})}))._currySelf())._asCompiledMethod_(aString),$HTMLCanvas(),"**snippets");
  2255. return self}, function($ctx1) {$ctx1.fill(self,"snippetAt:compile:",{aString:aString,anElement:anElement},smalltalk.HTMLSnippet)})},
  2256. args: ["aString", "anElement"],
  2257. source: "snippetAt: aString compile: anElement\x0a\x09\x22Method generation for the snippet.\x0a\x09The selector is aString, the method block uses anElement\x22\x0a\x09\x0a\x09ClassBuilder new\x0a\x09\x09installMethod: ([ :htmlReceiver | htmlReceiver snippet: anElement ]\x0a\x09\x09\x09currySelf asCompiledMethod: aString)\x0a\x09\x09forClass: HTMLCanvas\x0a\x09\x09category: '**snippets'",
  2258. messageSends: ["installMethod:forClass:category:", "new", "asCompiledMethod:", "currySelf", "snippet:"],
  2259. referencedClasses: ["ClassBuilder", "HTMLCanvas"]
  2260. }),
  2261. smalltalk.HTMLSnippet);
  2262. smalltalk.addMethod(
  2263. smalltalk.method({
  2264. selector: "snippetAt:install:",
  2265. category: 'snippet installation',
  2266. fn: function (aString,anElement){
  2267. var self=this;
  2268. return smalltalk.withContext(function($ctx1) {
  2269. _st(self._snippets())._at_put_(aString,anElement);
  2270. self._snippetAt_compile_(aString,anElement);
  2271. return self}, function($ctx1) {$ctx1.fill(self,"snippetAt:install:",{aString:aString,anElement:anElement},smalltalk.HTMLSnippet)})},
  2272. args: ["aString", "anElement"],
  2273. source: "snippetAt: aString install: anElement\x0a\x09self snippets at: aString put: anElement.\x0a\x09self snippetAt: aString compile: anElement",
  2274. messageSends: ["at:put:", "snippets", "snippetAt:compile:"],
  2275. referencedClasses: []
  2276. }),
  2277. smalltalk.HTMLSnippet);
  2278. smalltalk.addMethod(
  2279. smalltalk.method({
  2280. selector: "snippets",
  2281. category: 'accessing',
  2282. fn: function (){
  2283. var self=this;
  2284. return smalltalk.withContext(function($ctx1) {
  2285. var $2,$1;
  2286. $2=self["@snippets"];
  2287. if(($receiver = $2) == nil || $receiver == null){
  2288. self["@snippets"]=smalltalk.HashedCollection._from_([]);
  2289. $1=self["@snippets"];
  2290. } else {
  2291. $1=$2;
  2292. };
  2293. return $1;
  2294. }, function($ctx1) {$ctx1.fill(self,"snippets",{},smalltalk.HTMLSnippet)})},
  2295. args: [],
  2296. source: "snippets\x0a\x09^snippets ifNil: [ snippets := #{} ]",
  2297. messageSends: ["ifNil:"],
  2298. referencedClasses: []
  2299. }),
  2300. smalltalk.HTMLSnippet);
  2301. smalltalk.addMethod(
  2302. smalltalk.method({
  2303. selector: "snippetsFromJQuery:",
  2304. category: 'private',
  2305. fn: function (aJQuery){
  2306. var self=this;
  2307. return smalltalk.withContext(function($ctx1) {
  2308. var $1;
  2309. $1=_st(_st(aJQuery)._find_("[data-snippet]"))._toArray();
  2310. return $1;
  2311. }, function($ctx1) {$ctx1.fill(self,"snippetsFromJQuery:",{aJQuery:aJQuery},smalltalk.HTMLSnippet)})},
  2312. args: ["aJQuery"],
  2313. source: "snippetsFromJQuery: aJQuery\x0a\x09^ (aJQuery find: '[data-snippet]') toArray",
  2314. messageSends: ["toArray", "find:"],
  2315. referencedClasses: []
  2316. }),
  2317. smalltalk.HTMLSnippet);
  2318. smalltalk.HTMLSnippet.klass.iVarNames = ['current'];
  2319. smalltalk.addMethod(
  2320. smalltalk.method({
  2321. selector: "current",
  2322. category: 'instance creation',
  2323. fn: function (){
  2324. var self=this;
  2325. return smalltalk.withContext(function($ctx1) {
  2326. var $1;
  2327. $1=self["@current"];
  2328. return $1;
  2329. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.HTMLSnippet.klass)})},
  2330. args: [],
  2331. source: "current\x0a\x09^ current",
  2332. messageSends: [],
  2333. referencedClasses: []
  2334. }),
  2335. smalltalk.HTMLSnippet.klass);
  2336. smalltalk.addMethod(
  2337. smalltalk.method({
  2338. selector: "ensureCurrent",
  2339. category: 'initialization',
  2340. fn: function (){
  2341. var self=this;
  2342. return smalltalk.withContext(function($ctx1) {
  2343. var $1,$2,$3;
  2344. $1=self["@current"];
  2345. if(($receiver = $1) == nil || $receiver == null){
  2346. $2=smalltalk.HTMLSnippet.klass.superclass.fn.prototype._new.apply(_st(self), []);
  2347. _st($2)._initializeFromJQuery_(_st(document)._asJQuery());
  2348. $3=_st($2)._yourself();
  2349. self["@current"]=$3;
  2350. self["@current"];
  2351. } else {
  2352. $1;
  2353. };
  2354. return self}, function($ctx1) {$ctx1.fill(self,"ensureCurrent",{},smalltalk.HTMLSnippet.klass)})},
  2355. args: [],
  2356. source: "ensureCurrent\x0a\x09current ifNil: [\x0a\x09\x09current := super new\x0a\x09\x09\x09initializeFromJQuery: document asJQuery;\x0a\x09\x09\x09yourself ]",
  2357. messageSends: ["ifNil:", "initializeFromJQuery:", "new", "asJQuery", "yourself"],
  2358. referencedClasses: []
  2359. }),
  2360. smalltalk.HTMLSnippet.klass);
  2361. smalltalk.addMethod(
  2362. smalltalk.method({
  2363. selector: "initialize",
  2364. category: 'initialization',
  2365. fn: function (){
  2366. var self=this;
  2367. return smalltalk.withContext(function($ctx1) {
  2368. var $1;
  2369. smalltalk.HTMLSnippet.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
  2370. $1=self._isDOMAvailable();
  2371. if(smalltalk.assert($1)){
  2372. self._ensureCurrent();
  2373. };
  2374. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HTMLSnippet.klass)})},
  2375. args: [],
  2376. source: "initialize\x0a\x09super initialize.\x0a\x09self isDOMAvailable ifTrue: [\x0a\x09\x09self ensureCurrent ]",
  2377. messageSends: ["initialize", "ifTrue:", "isDOMAvailable", "ensureCurrent"],
  2378. referencedClasses: []
  2379. }),
  2380. smalltalk.HTMLSnippet.klass);
  2381. smalltalk.addMethod(
  2382. smalltalk.method({
  2383. selector: "isDOMAvailable",
  2384. category: 'instance creation',
  2385. fn: function (){
  2386. var self=this;
  2387. return smalltalk.withContext(function($ctx1) {
  2388. return typeof document !== 'undefined' ;
  2389. return self}, function($ctx1) {$ctx1.fill(self,"isDOMAvailable",{},smalltalk.HTMLSnippet.klass)})},
  2390. args: [],
  2391. source: "isDOMAvailable\x0a\x09< return typeof document !== 'undefined' >",
  2392. messageSends: [],
  2393. referencedClasses: []
  2394. }),
  2395. smalltalk.HTMLSnippet.klass);
  2396. smalltalk.addMethod(
  2397. smalltalk.method({
  2398. selector: "new",
  2399. category: 'instance creation',
  2400. fn: function (){
  2401. var self=this;
  2402. return smalltalk.withContext(function($ctx1) {
  2403. self._shouldNotImplement();
  2404. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.HTMLSnippet.klass)})},
  2405. args: [],
  2406. source: "new\x0a\x09self shouldNotImplement",
  2407. messageSends: ["shouldNotImplement"],
  2408. referencedClasses: []
  2409. }),
  2410. smalltalk.HTMLSnippet.klass);
  2411. smalltalk.addClass('TagBrush', smalltalk.Object, ['canvas', 'element'], 'Canvas');
  2412. smalltalk.TagBrush.comment="I am a brush for building a single DOM element (which I hold onto).\x0a\x0aAll tags but `<style>` are instances of me (see the `StyleBrush` class).\x0a\x0a## API\x0a\x0a1. Nesting\x0a\x0a Use `#with:` to nest tags. `#with:` can take aString, `TagBrush` instance, a `Widget` or block closure as parameter.\x0a\x0a Example: `aTag with: aString with: aCanvas div`\x0a\x0a2. Events\x0a\x0a The `events` protocol contains all methods related to events (delegating event handling to jQuery).\x0a\x0a Example: `aTag onClick: [ window alert: 'clicked' ]`\x0a\x0a3. Attributes\x0a\x0a The `attribute` protocol contains methods for attribute manipulation (delegating to jQuery too).\x0a\x0a Example: `aTag at: 'value' put: 'hello world'`\x0a\x0a4. Raw access and jQuery\x0a\x0a The `#element` method can be used to access to JavaScript DOM element object.\x0a\x0a Example: `aTag element cssStyle`\x0a\x0a Use `#asJQuery` to access to the receiver converted into a jQuery object.\x0a\x0a Example: `aTag asJQuery css: 'color' value: 'red'`";
  2413. smalltalk.addMethod(
  2414. smalltalk.method({
  2415. selector: "accesskey:",
  2416. category: 'attributes',
  2417. fn: function (aString){
  2418. var self=this;
  2419. return smalltalk.withContext(function($ctx1) {
  2420. self._at_put_("accesskey",aString);
  2421. return self}, function($ctx1) {$ctx1.fill(self,"accesskey:",{aString:aString},smalltalk.TagBrush)})},
  2422. args: ["aString"],
  2423. source: "accesskey: aString\x0a\x09self at: 'accesskey' put: aString",
  2424. messageSends: ["at:put:"],
  2425. referencedClasses: []
  2426. }),
  2427. smalltalk.TagBrush);
  2428. smalltalk.addMethod(
  2429. smalltalk.method({
  2430. selector: "action:",
  2431. category: 'attributes',
  2432. fn: function (aString){
  2433. var self=this;
  2434. return smalltalk.withContext(function($ctx1) {
  2435. self._at_put_("action",aString);
  2436. return self}, function($ctx1) {$ctx1.fill(self,"action:",{aString:aString},smalltalk.TagBrush)})},
  2437. args: ["aString"],
  2438. source: "action: aString\x0a\x09self at: 'action' put: aString",
  2439. messageSends: ["at:put:"],
  2440. referencedClasses: []
  2441. }),
  2442. smalltalk.TagBrush);
  2443. smalltalk.addMethod(
  2444. smalltalk.method({
  2445. selector: "addBrush:",
  2446. category: 'adding',
  2447. fn: function (aTagBrush){
  2448. var self=this;
  2449. return smalltalk.withContext(function($ctx1) {
  2450. self._appendChild_(_st(aTagBrush)._element());
  2451. return aTagBrush;
  2452. }, function($ctx1) {$ctx1.fill(self,"addBrush:",{aTagBrush:aTagBrush},smalltalk.TagBrush)})},
  2453. args: ["aTagBrush"],
  2454. source: "addBrush: aTagBrush\x0a\x09self appendChild: aTagBrush element.\x0a\x09^aTagBrush",
  2455. messageSends: ["appendChild:", "element"],
  2456. referencedClasses: []
  2457. }),
  2458. smalltalk.TagBrush);
  2459. smalltalk.addMethod(
  2460. smalltalk.method({
  2461. selector: "align:",
  2462. category: 'attributes',
  2463. fn: function (aString){
  2464. var self=this;
  2465. return smalltalk.withContext(function($ctx1) {
  2466. self._at_put_("align",aString);
  2467. return self}, function($ctx1) {$ctx1.fill(self,"align:",{aString:aString},smalltalk.TagBrush)})},
  2468. args: ["aString"],
  2469. source: "align: aString\x0a\x09self at: 'align' put: aString",
  2470. messageSends: ["at:put:"],
  2471. referencedClasses: []
  2472. }),
  2473. smalltalk.TagBrush);
  2474. smalltalk.addMethod(
  2475. smalltalk.method({
  2476. selector: "alt:",
  2477. category: 'attributes',
  2478. fn: function (aString){
  2479. var self=this;
  2480. return smalltalk.withContext(function($ctx1) {
  2481. self._at_put_("alt",aString);
  2482. return self}, function($ctx1) {$ctx1.fill(self,"alt:",{aString:aString},smalltalk.TagBrush)})},
  2483. args: ["aString"],
  2484. source: "alt: aString\x0a\x09self at: 'alt' put: aString",
  2485. messageSends: ["at:put:"],
  2486. referencedClasses: []
  2487. }),
  2488. smalltalk.TagBrush);
  2489. smalltalk.addMethod(
  2490. smalltalk.method({
  2491. selector: "append:",
  2492. category: 'adding',
  2493. fn: function (anObject){
  2494. var self=this;
  2495. return smalltalk.withContext(function($ctx1) {
  2496. _st(anObject)._appendToBrush_(self);
  2497. return self}, function($ctx1) {$ctx1.fill(self,"append:",{anObject:anObject},smalltalk.TagBrush)})},
  2498. args: ["anObject"],
  2499. source: "append: anObject\x0a\x09anObject appendToBrush: self",
  2500. messageSends: ["appendToBrush:"],
  2501. referencedClasses: []
  2502. }),
  2503. smalltalk.TagBrush);
  2504. smalltalk.addMethod(
  2505. smalltalk.method({
  2506. selector: "appendBlock:",
  2507. category: 'adding',
  2508. fn: function (aBlock){
  2509. var self=this;
  2510. var root;
  2511. return smalltalk.withContext(function($ctx1) {
  2512. root=_st(self["@canvas"])._root();
  2513. _st(self["@canvas"])._root_(self);
  2514. $ctx1.sendIdx["root:"]=1;
  2515. _st(aBlock)._value_(self["@canvas"]);
  2516. _st(self["@canvas"])._root_(root);
  2517. return self}, function($ctx1) {$ctx1.fill(self,"appendBlock:",{aBlock:aBlock,root:root},smalltalk.TagBrush)})},
  2518. args: ["aBlock"],
  2519. source: "appendBlock: aBlock\x0a\x09| root |\x0a\x09root := canvas root.\x0a\x09canvas root: self.\x0a\x09aBlock value: canvas.\x0a\x09canvas root: root",
  2520. messageSends: ["root", "root:", "value:"],
  2521. referencedClasses: []
  2522. }),
  2523. smalltalk.TagBrush);
  2524. smalltalk.addMethod(
  2525. smalltalk.method({
  2526. selector: "appendChild:",
  2527. category: 'adding',
  2528. fn: function (anElement){
  2529. var self=this;
  2530. return smalltalk.withContext(function($ctx1) {
  2531. var element=self['@element'];
  2532. if (null == element.canHaveChildren || element.canHaveChildren) {
  2533. element.appendChild(anElement);
  2534. } else {
  2535. element.text = String(element.text) + anElement.innerHTML;
  2536. } ;
  2537. return self}, function($ctx1) {$ctx1.fill(self,"appendChild:",{anElement:anElement},smalltalk.TagBrush)})},
  2538. args: ["anElement"],
  2539. source: "appendChild: anElement\x0a\x09\x22In IE7 and IE8 appendChild fails on several node types. So we need to check\x22\x0a\x09<var element=self['@element'];\x0a\x09if (null == element.canHaveChildren || element.canHaveChildren) {\x0a\x09\x09element.appendChild(anElement);\x0a\x09} else {\x0a\x09\x09element.text = String(element.text) + anElement.innerHTML;\x0a\x09} >",
  2540. messageSends: [],
  2541. referencedClasses: []
  2542. }),
  2543. smalltalk.TagBrush);
  2544. smalltalk.addMethod(
  2545. smalltalk.method({
  2546. selector: "appendDocumentFragment:",
  2547. category: 'private',
  2548. fn: function (anElement){
  2549. var self=this;
  2550. return smalltalk.withContext(function($ctx1) {
  2551. var element=self['@element'].appendChild(anElement["@element"]);
  2552. return self}, function($ctx1) {$ctx1.fill(self,"appendDocumentFragment:",{anElement:anElement},smalltalk.TagBrush)})},
  2553. args: ["anElement"],
  2554. source: "appendDocumentFragment: anElement\x0a\x09<var element=self['@element'].appendChild(anElement[\x22@element\x22])>",
  2555. messageSends: [],
  2556. referencedClasses: []
  2557. }),
  2558. smalltalk.TagBrush);
  2559. smalltalk.addMethod(
  2560. smalltalk.method({
  2561. selector: "appendString:",
  2562. category: 'adding',
  2563. fn: function (aString){
  2564. var self=this;
  2565. return smalltalk.withContext(function($ctx1) {
  2566. self._appendChild_(self._createTextNodeFor_(aString));
  2567. return self}, function($ctx1) {$ctx1.fill(self,"appendString:",{aString:aString},smalltalk.TagBrush)})},
  2568. args: ["aString"],
  2569. source: "appendString: aString\x0a\x09self appendChild: (self createTextNodeFor: aString)",
  2570. messageSends: ["appendChild:", "createTextNodeFor:"],
  2571. referencedClasses: []
  2572. }),
  2573. smalltalk.TagBrush);
  2574. smalltalk.addMethod(
  2575. smalltalk.method({
  2576. selector: "appendToBrush:",
  2577. category: 'adding',
  2578. fn: function (aTagBrush){
  2579. var self=this;
  2580. return smalltalk.withContext(function($ctx1) {
  2581. _st(aTagBrush)._addBrush_(self);
  2582. return self}, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},smalltalk.TagBrush)})},
  2583. args: ["aTagBrush"],
  2584. source: "appendToBrush: aTagBrush\x0a\x09aTagBrush addBrush: self",
  2585. messageSends: ["addBrush:"],
  2586. referencedClasses: []
  2587. }),
  2588. smalltalk.TagBrush);
  2589. smalltalk.addMethod(
  2590. smalltalk.method({
  2591. selector: "asJQuery",
  2592. category: 'converting',
  2593. fn: function (){
  2594. var self=this;
  2595. return smalltalk.withContext(function($ctx1) {
  2596. var $1;
  2597. $1=_st(self._element())._asJQuery();
  2598. return $1;
  2599. }, function($ctx1) {$ctx1.fill(self,"asJQuery",{},smalltalk.TagBrush)})},
  2600. args: [],
  2601. source: "asJQuery\x0a\x09^self element asJQuery",
  2602. messageSends: ["asJQuery", "element"],
  2603. referencedClasses: []
  2604. }),
  2605. smalltalk.TagBrush);
  2606. smalltalk.addMethod(
  2607. smalltalk.method({
  2608. selector: "at:put:",
  2609. category: 'attributes',
  2610. fn: function (aString,aValue){
  2611. var self=this;
  2612. return smalltalk.withContext(function($ctx1) {
  2613. self['@element'].setAttribute(aString, aValue);
  2614. return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{aString:aString,aValue:aValue},smalltalk.TagBrush)})},
  2615. args: ["aString", "aValue"],
  2616. source: "at: aString put: aValue\x0a\x09<self['@element'].setAttribute(aString, aValue)>",
  2617. messageSends: [],
  2618. referencedClasses: []
  2619. }),
  2620. smalltalk.TagBrush);
  2621. smalltalk.addMethod(
  2622. smalltalk.method({
  2623. selector: "class:",
  2624. category: 'attributes',
  2625. fn: function (aString){
  2626. var self=this;
  2627. return smalltalk.withContext(function($ctx1) {
  2628. self['@element'].className = aString;
  2629. return self}, function($ctx1) {$ctx1.fill(self,"class:",{aString:aString},smalltalk.TagBrush)})},
  2630. args: ["aString"],
  2631. source: "class: aString\x0a\x09<self['@element'].className = aString>",
  2632. messageSends: [],
  2633. referencedClasses: []
  2634. }),
  2635. smalltalk.TagBrush);
  2636. smalltalk.addMethod(
  2637. smalltalk.method({
  2638. selector: "cols:",
  2639. category: 'attributes',
  2640. fn: function (aString){
  2641. var self=this;
  2642. return smalltalk.withContext(function($ctx1) {
  2643. self._at_put_("cols",aString);
  2644. return self}, function($ctx1) {$ctx1.fill(self,"cols:",{aString:aString},smalltalk.TagBrush)})},
  2645. args: ["aString"],
  2646. source: "cols: aString\x0a\x09self at: 'cols' put: aString",
  2647. messageSends: ["at:put:"],
  2648. referencedClasses: []
  2649. }),
  2650. smalltalk.TagBrush);
  2651. smalltalk.addMethod(
  2652. smalltalk.method({
  2653. selector: "contenteditable:",
  2654. category: 'attributes',
  2655. fn: function (aString){
  2656. var self=this;
  2657. return smalltalk.withContext(function($ctx1) {
  2658. self._at_put_("contenteditable",aString);
  2659. return self}, function($ctx1) {$ctx1.fill(self,"contenteditable:",{aString:aString},smalltalk.TagBrush)})},
  2660. args: ["aString"],
  2661. source: "contenteditable: aString\x0a\x09self at: 'contenteditable' put: aString",
  2662. messageSends: ["at:put:"],
  2663. referencedClasses: []
  2664. }),
  2665. smalltalk.TagBrush);
  2666. smalltalk.addMethod(
  2667. smalltalk.method({
  2668. selector: "contents:",
  2669. category: 'adding',
  2670. fn: function (anObject){
  2671. var self=this;
  2672. return smalltalk.withContext(function($ctx1) {
  2673. var $1;
  2674. self._empty();
  2675. $1=self._append_(anObject);
  2676. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{anObject:anObject},smalltalk.TagBrush)})},
  2677. args: ["anObject"],
  2678. source: "contents: anObject\x0a\x09self\x0a\x09empty;\x0a\x09append: anObject",
  2679. messageSends: ["empty", "append:"],
  2680. referencedClasses: []
  2681. }),
  2682. smalltalk.TagBrush);
  2683. smalltalk.addMethod(
  2684. smalltalk.method({
  2685. selector: "contextmenu:",
  2686. category: 'attributes',
  2687. fn: function (aString){
  2688. var self=this;
  2689. return smalltalk.withContext(function($ctx1) {
  2690. self._at_put_("contextmenu",aString);
  2691. return self}, function($ctx1) {$ctx1.fill(self,"contextmenu:",{aString:aString},smalltalk.TagBrush)})},
  2692. args: ["aString"],
  2693. source: "contextmenu: aString\x0a\x09self at: 'contextmenu' put: aString",
  2694. messageSends: ["at:put:"],
  2695. referencedClasses: []
  2696. }),
  2697. smalltalk.TagBrush);
  2698. smalltalk.addMethod(
  2699. smalltalk.method({
  2700. selector: "createElementFor:",
  2701. category: 'private',
  2702. fn: function (aString){
  2703. var self=this;
  2704. return smalltalk.withContext(function($ctx1) {
  2705. return document.createElement(String(aString));
  2706. return self}, function($ctx1) {$ctx1.fill(self,"createElementFor:",{aString:aString},smalltalk.TagBrush)})},
  2707. args: ["aString"],
  2708. source: "createElementFor: aString\x0a\x09<return document.createElement(String(aString))>",
  2709. messageSends: [],
  2710. referencedClasses: []
  2711. }),
  2712. smalltalk.TagBrush);
  2713. smalltalk.addMethod(
  2714. smalltalk.method({
  2715. selector: "createTextNodeFor:",
  2716. category: 'private',
  2717. fn: function (aString){
  2718. var self=this;
  2719. return smalltalk.withContext(function($ctx1) {
  2720. return document.createTextNode(String(aString));
  2721. return self}, function($ctx1) {$ctx1.fill(self,"createTextNodeFor:",{aString:aString},smalltalk.TagBrush)})},
  2722. args: ["aString"],
  2723. source: "createTextNodeFor: aString\x0a\x09<return document.createTextNode(String(aString))>",
  2724. messageSends: [],
  2725. referencedClasses: []
  2726. }),
  2727. smalltalk.TagBrush);
  2728. smalltalk.addMethod(
  2729. smalltalk.method({
  2730. selector: "draggable:",
  2731. category: 'attributes',
  2732. fn: function (aString){
  2733. var self=this;
  2734. return smalltalk.withContext(function($ctx1) {
  2735. self._at_put_("draggable",aString);
  2736. return self}, function($ctx1) {$ctx1.fill(self,"draggable:",{aString:aString},smalltalk.TagBrush)})},
  2737. args: ["aString"],
  2738. source: "draggable: aString\x0a\x09self at: 'draggable' put: aString",
  2739. messageSends: ["at:put:"],
  2740. referencedClasses: []
  2741. }),
  2742. smalltalk.TagBrush);
  2743. smalltalk.addMethod(
  2744. smalltalk.method({
  2745. selector: "element",
  2746. category: 'accessing',
  2747. fn: function (){
  2748. var self=this;
  2749. return smalltalk.withContext(function($ctx1) {
  2750. var $1;
  2751. $1=self["@element"];
  2752. return $1;
  2753. }, function($ctx1) {$ctx1.fill(self,"element",{},smalltalk.TagBrush)})},
  2754. args: [],
  2755. source: "element\x0a\x09^element",
  2756. messageSends: [],
  2757. referencedClasses: []
  2758. }),
  2759. smalltalk.TagBrush);
  2760. smalltalk.addMethod(
  2761. smalltalk.method({
  2762. selector: "empty",
  2763. category: 'adding',
  2764. fn: function (){
  2765. var self=this;
  2766. return smalltalk.withContext(function($ctx1) {
  2767. _st(self._asJQuery())._empty();
  2768. return self}, function($ctx1) {$ctx1.fill(self,"empty",{},smalltalk.TagBrush)})},
  2769. args: [],
  2770. source: "empty\x0a\x09self asJQuery empty",
  2771. messageSends: ["empty", "asJQuery"],
  2772. referencedClasses: []
  2773. }),
  2774. smalltalk.TagBrush);
  2775. smalltalk.addMethod(
  2776. smalltalk.method({
  2777. selector: "for:",
  2778. category: 'attributes',
  2779. fn: function (aString){
  2780. var self=this;
  2781. return smalltalk.withContext(function($ctx1) {
  2782. self._at_put_("for",aString);
  2783. return self}, function($ctx1) {$ctx1.fill(self,"for:",{aString:aString},smalltalk.TagBrush)})},
  2784. args: ["aString"],
  2785. source: "for: aString\x0a\x09self at: 'for' put: aString",
  2786. messageSends: ["at:put:"],
  2787. referencedClasses: []
  2788. }),
  2789. smalltalk.TagBrush);
  2790. smalltalk.addMethod(
  2791. smalltalk.method({
  2792. selector: "height:",
  2793. category: 'attributes',
  2794. fn: function (aString){
  2795. var self=this;
  2796. return smalltalk.withContext(function($ctx1) {
  2797. self._at_put_("height",aString);
  2798. return self}, function($ctx1) {$ctx1.fill(self,"height:",{aString:aString},smalltalk.TagBrush)})},
  2799. args: ["aString"],
  2800. source: "height: aString\x0a\x09self at: 'height' put: aString",
  2801. messageSends: ["at:put:"],
  2802. referencedClasses: []
  2803. }),
  2804. smalltalk.TagBrush);
  2805. smalltalk.addMethod(
  2806. smalltalk.method({
  2807. selector: "hidden",
  2808. category: 'attributes',
  2809. fn: function (){
  2810. var self=this;
  2811. return smalltalk.withContext(function($ctx1) {
  2812. self._at_put_("hidden","hidden");
  2813. return self}, function($ctx1) {$ctx1.fill(self,"hidden",{},smalltalk.TagBrush)})},
  2814. args: [],
  2815. source: "hidden\x0a\x09self at: 'hidden' put: 'hidden'",
  2816. messageSends: ["at:put:"],
  2817. referencedClasses: []
  2818. }),
  2819. smalltalk.TagBrush);
  2820. smalltalk.addMethod(
  2821. smalltalk.method({
  2822. selector: "href:",
  2823. category: 'attributes',
  2824. fn: function (aString){
  2825. var self=this;
  2826. return smalltalk.withContext(function($ctx1) {
  2827. self._at_put_("href",aString);
  2828. return self}, function($ctx1) {$ctx1.fill(self,"href:",{aString:aString},smalltalk.TagBrush)})},
  2829. args: ["aString"],
  2830. source: "href: aString\x0a\x09self at: 'href' put: aString",
  2831. messageSends: ["at:put:"],
  2832. referencedClasses: []
  2833. }),
  2834. smalltalk.TagBrush);
  2835. smalltalk.addMethod(
  2836. smalltalk.method({
  2837. selector: "id:",
  2838. category: 'attributes',
  2839. fn: function (aString){
  2840. var self=this;
  2841. return smalltalk.withContext(function($ctx1) {
  2842. self._at_put_("id",aString);
  2843. return self}, function($ctx1) {$ctx1.fill(self,"id:",{aString:aString},smalltalk.TagBrush)})},
  2844. args: ["aString"],
  2845. source: "id: aString\x0a\x09self at: 'id' put: aString",
  2846. messageSends: ["at:put:"],
  2847. referencedClasses: []
  2848. }),
  2849. smalltalk.TagBrush);
  2850. smalltalk.addMethod(
  2851. smalltalk.method({
  2852. selector: "initializeFromJQuery:canvas:",
  2853. category: 'initialization',
  2854. fn: function (aJQuery,aCanvas){
  2855. var self=this;
  2856. return smalltalk.withContext(function($ctx1) {
  2857. self["@element"]=_st(aJQuery)._get_((0));
  2858. self["@canvas"]=aCanvas;
  2859. return self}, function($ctx1) {$ctx1.fill(self,"initializeFromJQuery:canvas:",{aJQuery:aJQuery,aCanvas:aCanvas},smalltalk.TagBrush)})},
  2860. args: ["aJQuery", "aCanvas"],
  2861. source: "initializeFromJQuery: aJQuery canvas: aCanvas\x0a\x09element := aJQuery get: 0.\x0a\x09canvas := aCanvas",
  2862. messageSends: ["get:"],
  2863. referencedClasses: []
  2864. }),
  2865. smalltalk.TagBrush);
  2866. smalltalk.addMethod(
  2867. smalltalk.method({
  2868. selector: "initializeFromString:canvas:",
  2869. category: 'initialization',
  2870. fn: function (aString,aCanvas){
  2871. var self=this;
  2872. return smalltalk.withContext(function($ctx1) {
  2873. self["@element"]=self._createElementFor_(aString);
  2874. self["@canvas"]=aCanvas;
  2875. return self}, function($ctx1) {$ctx1.fill(self,"initializeFromString:canvas:",{aString:aString,aCanvas:aCanvas},smalltalk.TagBrush)})},
  2876. args: ["aString", "aCanvas"],
  2877. source: "initializeFromString: aString canvas: aCanvas\x0a\x09element := self createElementFor: aString.\x0a\x09canvas := aCanvas",
  2878. messageSends: ["createElementFor:"],
  2879. referencedClasses: []
  2880. }),
  2881. smalltalk.TagBrush);
  2882. smalltalk.addMethod(
  2883. smalltalk.method({
  2884. selector: "media:",
  2885. category: 'attributes',
  2886. fn: function (aString){
  2887. var self=this;
  2888. return smalltalk.withContext(function($ctx1) {
  2889. self._at_put_("media",aString);
  2890. return self}, function($ctx1) {$ctx1.fill(self,"media:",{aString:aString},smalltalk.TagBrush)})},
  2891. args: ["aString"],
  2892. source: "media: aString\x0a\x09self at: 'media' put: aString",
  2893. messageSends: ["at:put:"],
  2894. referencedClasses: []
  2895. }),
  2896. smalltalk.TagBrush);
  2897. smalltalk.addMethod(
  2898. smalltalk.method({
  2899. selector: "method:",
  2900. category: 'attributes',
  2901. fn: function (aString){
  2902. var self=this;
  2903. return smalltalk.withContext(function($ctx1) {
  2904. self._at_put_("method",aString);
  2905. return self}, function($ctx1) {$ctx1.fill(self,"method:",{aString:aString},smalltalk.TagBrush)})},
  2906. args: ["aString"],
  2907. source: "method: aString\x0a\x09self at: 'method' put: aString",
  2908. messageSends: ["at:put:"],
  2909. referencedClasses: []
  2910. }),
  2911. smalltalk.TagBrush);
  2912. smalltalk.addMethod(
  2913. smalltalk.method({
  2914. selector: "name:",
  2915. category: 'attributes',
  2916. fn: function (aString){
  2917. var self=this;
  2918. return smalltalk.withContext(function($ctx1) {
  2919. self._at_put_("name",aString);
  2920. return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString},smalltalk.TagBrush)})},
  2921. args: ["aString"],
  2922. source: "name: aString\x0a\x09self at: 'name' put: aString",
  2923. messageSends: ["at:put:"],
  2924. referencedClasses: []
  2925. }),
  2926. smalltalk.TagBrush);
  2927. smalltalk.addMethod(
  2928. smalltalk.method({
  2929. selector: "onBlur:",
  2930. category: 'events',
  2931. fn: function (aBlock){
  2932. var self=this;
  2933. return smalltalk.withContext(function($ctx1) {
  2934. _st(self._asJQuery())._bind_do_("blur",aBlock);
  2935. return self}, function($ctx1) {$ctx1.fill(self,"onBlur:",{aBlock:aBlock},smalltalk.TagBrush)})},
  2936. args: ["aBlock"],
  2937. source: "onBlur: aBlock\x0a\x09self asJQuery bind: 'blur' do: aBlock",
  2938. messageSends: ["bind:do:", "asJQuery"],
  2939. referencedClasses: []
  2940. }),
  2941. smalltalk.TagBrush);
  2942. smalltalk.addMethod(
  2943. smalltalk.method({
  2944. selector: "onChange:",
  2945. category: 'events',
  2946. fn: function (aBlock){
  2947. var self=this;
  2948. return smalltalk.withContext(function($ctx1) {
  2949. _st(self._asJQuery())._bind_do_("change",aBlock);
  2950. return self}, function($ctx1) {$ctx1.fill(self,"onChange:",{aBlock:aBlock},smalltalk.TagBrush)})},
  2951. args: ["aBlock"],
  2952. source: "onChange: aBlock\x0a\x09self asJQuery bind: 'change' do: aBlock",
  2953. messageSends: ["bind:do:", "asJQuery"],
  2954. referencedClasses: []
  2955. }),
  2956. smalltalk.TagBrush);
  2957. smalltalk.addMethod(
  2958. smalltalk.method({
  2959. selector: "onClick:",
  2960. category: 'events',
  2961. fn: function (aBlock){
  2962. var self=this;
  2963. return smalltalk.withContext(function($ctx1) {
  2964. _st(self._asJQuery())._bind_do_("click",aBlock);
  2965. return self}, function($ctx1) {$ctx1.fill(self,"onClick:",{aBlock:aBlock},smalltalk.TagBrush)})},
  2966. args: ["aBlock"],
  2967. source: "onClick: aBlock\x0a\x09self asJQuery bind: 'click' do: aBlock",
  2968. messageSends: ["bind:do:", "asJQuery"],
  2969. referencedClasses: []
  2970. }),
  2971. smalltalk.TagBrush);
  2972. smalltalk.addMethod(
  2973. smalltalk.method({
  2974. selector: "onDblClick:",
  2975. category: 'events',
  2976. fn: function (aBlock){
  2977. var self=this;
  2978. return smalltalk.withContext(function($ctx1) {
  2979. _st(self._asJQuery())._bind_do_("dblclick",aBlock);
  2980. return self}, function($ctx1) {$ctx1.fill(self,"onDblClick:",{aBlock:aBlock},smalltalk.TagBrush)})},
  2981. args: ["aBlock"],
  2982. source: "onDblClick: aBlock\x0a\x09self asJQuery bind: 'dblclick' do: aBlock",
  2983. messageSends: ["bind:do:", "asJQuery"],
  2984. referencedClasses: []
  2985. }),
  2986. smalltalk.TagBrush);
  2987. smalltalk.addMethod(
  2988. smalltalk.method({
  2989. selector: "onFocus:",
  2990. category: 'events',
  2991. fn: function (aBlock){
  2992. var self=this;
  2993. return smalltalk.withContext(function($ctx1) {
  2994. _st(self._asJQuery())._bind_do_("focus",aBlock);
  2995. return self}, function($ctx1) {$ctx1.fill(self,"onFocus:",{aBlock:aBlock},smalltalk.TagBrush)})},
  2996. args: ["aBlock"],
  2997. source: "onFocus: aBlock\x0a\x09self asJQuery bind: 'focus' do: aBlock",
  2998. messageSends: ["bind:do:", "asJQuery"],
  2999. referencedClasses: []
  3000. }),
  3001. smalltalk.TagBrush);
  3002. smalltalk.addMethod(
  3003. smalltalk.method({
  3004. selector: "onFocusIn:",
  3005. category: 'events',
  3006. fn: function (aBlock){
  3007. var self=this;
  3008. return smalltalk.withContext(function($ctx1) {
  3009. _st(self._asJQuery())._bind_do_("focusin",aBlock);
  3010. return self}, function($ctx1) {$ctx1.fill(self,"onFocusIn:",{aBlock:aBlock},smalltalk.TagBrush)})},
  3011. args: ["aBlock"],
  3012. source: "onFocusIn: aBlock\x0a\x09self asJQuery bind: 'focusin' do: aBlock",
  3013. messageSends: ["bind:do:", "asJQuery"],
  3014. referencedClasses: []
  3015. }),
  3016. smalltalk.TagBrush);
  3017. smalltalk.addMethod(
  3018. smalltalk.method({
  3019. selector: "onFocusOut:",
  3020. category: 'events',
  3021. fn: function (aBlock){
  3022. var self=this;
  3023. return smalltalk.withContext(function($ctx1) {
  3024. _st(self._asJQuery())._bind_do_("focusout",aBlock);
  3025. return self}, function($ctx1) {$ctx1.fill(self,"onFocusOut:",{aBlock:aBlock},smalltalk.TagBrush)})},
  3026. args: ["aBlock"],
  3027. source: "onFocusOut: aBlock\x0a\x09self asJQuery bind: 'focusout' do: aBlock",
  3028. messageSends: ["bind:do:", "asJQuery"],
  3029. referencedClasses: []
  3030. }),
  3031. smalltalk.TagBrush);
  3032. smalltalk.addMethod(
  3033. smalltalk.method({
  3034. selector: "onHover:",
  3035. category: 'events',
  3036. fn: function (aBlock){
  3037. var self=this;
  3038. return smalltalk.withContext(function($ctx1) {
  3039. _st(self._asJQuery())._bind_do_("hover",aBlock);
  3040. return self}, function($ctx1) {$ctx1.fill(self,"onHover:",{aBlock:aBlock},smalltalk.TagBrush)})},
  3041. args: ["aBlock"],
  3042. source: "onHover: aBlock\x0a\x09self asJQuery bind: 'hover' do: aBlock",
  3043. messageSends: ["bind:do:", "asJQuery"],
  3044. referencedClasses: []
  3045. }),
  3046. smalltalk.TagBrush);
  3047. smalltalk.addMethod(
  3048. smalltalk.method({
  3049. selector: "onKeyDown:",
  3050. category: 'events',
  3051. fn: function (aBlock){
  3052. var self=this;
  3053. return smalltalk.withContext(function($ctx1) {
  3054. _st(self._asJQuery())._bind_do_("keydown",aBlock);
  3055. return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{aBlock:aBlock},smalltalk.TagBrush)})},
  3056. args: ["aBlock"],
  3057. source: "onKeyDown: aBlock\x0a\x09self asJQuery bind: 'keydown' do: aBlock",
  3058. messageSends: ["bind:do:", "asJQuery"],
  3059. referencedClasses: []
  3060. }),
  3061. smalltalk.TagBrush);
  3062. smalltalk.addMethod(
  3063. smalltalk.method({
  3064. selector: "onKeyPress:",
  3065. category: 'events',
  3066. fn: function (aBlock){
  3067. var self=this;
  3068. return smalltalk.withContext(function($ctx1) {
  3069. _st(self._asJQuery())._bind_do_("keypress",aBlock);
  3070. return self}, function($ctx1) {$ctx1.fill(self,"onKeyPress:",{aBlock:aBlock},smalltalk.TagBrush)})},
  3071. args: ["aBlock"],
  3072. source: "onKeyPress: aBlock\x0a\x09self asJQuery bind: 'keypress' do: aBlock",
  3073. messageSends: ["bind:do:", "asJQuery"],
  3074. referencedClasses: []
  3075. }),
  3076. smalltalk.TagBrush);
  3077. smalltalk.addMethod(
  3078. smalltalk.method({
  3079. selector: "onKeyUp:",
  3080. category: 'events',
  3081. fn: function (aBlock){
  3082. var self=this;
  3083. return smalltalk.withContext(function($ctx1) {
  3084. _st(self._asJQuery())._bind_do_("keyup",aBlock);
  3085. return self}, function($ctx1) {$ctx1.fill(self,"onKeyUp:",{aBlock:aBlock},smalltalk.TagBrush)})},
  3086. args: ["aBlock"],
  3087. source: "onKeyUp: aBlock\x0a\x09self asJQuery bind: 'keyup' do: aBlock",
  3088. messageSends: ["bind:do:", "asJQuery"],
  3089. referencedClasses: []
  3090. }),
  3091. smalltalk.TagBrush);
  3092. smalltalk.addMethod(
  3093. smalltalk.method({
  3094. selector: "onMouseDown:",
  3095. category: 'events',
  3096. fn: function (aBlock){
  3097. var self=this;
  3098. return smalltalk.withContext(function($ctx1) {
  3099. _st(self._asJQuery())._bind_do_("mousedown",aBlock);
  3100. return self}, function($ctx1) {$ctx1.fill(self,"onMouseDown:",{aBlock:aBlock},smalltalk.TagBrush)})},
  3101. args: ["aBlock"],
  3102. source: "onMouseDown: aBlock\x0a\x09self asJQuery bind: 'mousedown' do: aBlock",
  3103. messageSends: ["bind:do:", "asJQuery"],
  3104. referencedClasses: []
  3105. }),
  3106. smalltalk.TagBrush);
  3107. smalltalk.addMethod(
  3108. smalltalk.method({
  3109. selector: "onMouseEnter:",
  3110. category: 'events',
  3111. fn: function (aBlock){
  3112. var self=this;
  3113. return smalltalk.withContext(function($ctx1) {
  3114. _st(self._asJQuery())._bind_do_("mouseenter",aBlock);
  3115. return self}, function($ctx1) {$ctx1.fill(self,"onMouseEnter:",{aBlock:aBlock},smalltalk.TagBrush)})},
  3116. args: ["aBlock"],
  3117. source: "onMouseEnter: aBlock\x0a\x09self asJQuery bind: 'mouseenter' do: aBlock",
  3118. messageSends: ["bind:do:", "asJQuery"],
  3119. referencedClasses: []
  3120. }),
  3121. smalltalk.TagBrush);
  3122. smalltalk.addMethod(
  3123. smalltalk.method({
  3124. selector: "onMouseLeave:",
  3125. category: 'events',
  3126. fn: function (aBlock){
  3127. var self=this;
  3128. return smalltalk.withContext(function($ctx1) {
  3129. _st(self._asJQuery())._bind_do_("mouseleave",aBlock);
  3130. return self}, function($ctx1) {$ctx1.fill(self,"onMouseLeave:",{aBlock:aBlock},smalltalk.TagBrush)})},
  3131. args: ["aBlock"],
  3132. source: "onMouseLeave: aBlock\x0a\x09self asJQuery bind: 'mouseleave' do: aBlock",
  3133. messageSends: ["bind:do:", "asJQuery"],
  3134. referencedClasses: []
  3135. }),
  3136. smalltalk.TagBrush);
  3137. smalltalk.addMethod(
  3138. smalltalk.method({
  3139. selector: "onMouseMove:",
  3140. category: 'events',
  3141. fn: function (aBlock){
  3142. var self=this;
  3143. return smalltalk.withContext(function($ctx1) {
  3144. _st(self._asJQuery())._bind_do_("mousemove",aBlock);
  3145. return self}, function($ctx1) {$ctx1.fill(self,"onMouseMove:",{aBlock:aBlock},smalltalk.TagBrush)})},
  3146. args: ["aBlock"],
  3147. source: "onMouseMove: aBlock\x0a\x09self asJQuery bind: 'mousemove' do: aBlock",
  3148. messageSends: ["bind:do:", "asJQuery"],
  3149. referencedClasses: []
  3150. }),
  3151. smalltalk.TagBrush);
  3152. smalltalk.addMethod(
  3153. smalltalk.method({
  3154. selector: "onMouseOut:",
  3155. category: 'events',
  3156. fn: function (aBlock){
  3157. var self=this;
  3158. return smalltalk.withContext(function($ctx1) {
  3159. _st(self._asJQuery())._bind_do_("mouseout",aBlock);
  3160. return self}, function($ctx1) {$ctx1.fill(self,"onMouseOut:",{aBlock:aBlock},smalltalk.TagBrush)})},
  3161. args: ["aBlock"],
  3162. source: "onMouseOut: aBlock\x0a\x09self asJQuery bind: 'mouseout' do: aBlock",
  3163. messageSends: ["bind:do:", "asJQuery"],
  3164. referencedClasses: []
  3165. }),
  3166. smalltalk.TagBrush);
  3167. smalltalk.addMethod(
  3168. smalltalk.method({
  3169. selector: "onMouseOver:",
  3170. category: 'events',
  3171. fn: function (aBlock){
  3172. var self=this;
  3173. return smalltalk.withContext(function($ctx1) {
  3174. _st(self._asJQuery())._bind_do_("mouseover",aBlock);
  3175. return self}, function($ctx1) {$ctx1.fill(self,"onMouseOver:",{aBlock:aBlock},smalltalk.TagBrush)})},
  3176. args: ["aBlock"],
  3177. source: "onMouseOver: aBlock\x0a\x09self asJQuery bind: 'mouseover' do: aBlock",
  3178. messageSends: ["bind:do:", "asJQuery"],
  3179. referencedClasses: []
  3180. }),
  3181. smalltalk.TagBrush);
  3182. smalltalk.addMethod(
  3183. smalltalk.method({
  3184. selector: "onMouseUp:",
  3185. category: 'events',
  3186. fn: function (aBlock){
  3187. var self=this;
  3188. return smalltalk.withContext(function($ctx1) {
  3189. _st(self._asJQuery())._bind_do_("mouseup",aBlock);
  3190. return self}, function($ctx1) {$ctx1.fill(self,"onMouseUp:",{aBlock:aBlock},smalltalk.TagBrush)})},
  3191. args: ["aBlock"],
  3192. source: "onMouseUp: aBlock\x0a\x09self asJQuery bind: 'mouseup' do: aBlock",
  3193. messageSends: ["bind:do:", "asJQuery"],
  3194. referencedClasses: []
  3195. }),
  3196. smalltalk.TagBrush);
  3197. smalltalk.addMethod(
  3198. smalltalk.method({
  3199. selector: "onSelect:",
  3200. category: 'events',
  3201. fn: function (aBlock){
  3202. var self=this;
  3203. return smalltalk.withContext(function($ctx1) {
  3204. _st(self._asJQuery())._bind_do_("select",aBlock);
  3205. return self}, function($ctx1) {$ctx1.fill(self,"onSelect:",{aBlock:aBlock},smalltalk.TagBrush)})},
  3206. args: ["aBlock"],
  3207. source: "onSelect: aBlock\x0a\x09self asJQuery bind: 'select' do: aBlock",
  3208. messageSends: ["bind:do:", "asJQuery"],
  3209. referencedClasses: []
  3210. }),
  3211. smalltalk.TagBrush);
  3212. smalltalk.addMethod(
  3213. smalltalk.method({
  3214. selector: "onSubmit:",
  3215. category: 'events',
  3216. fn: function (aBlock){
  3217. var self=this;
  3218. return smalltalk.withContext(function($ctx1) {
  3219. _st(self._asJQuery())._bind_do_("submit",aBlock);
  3220. return self}, function($ctx1) {$ctx1.fill(self,"onSubmit:",{aBlock:aBlock},smalltalk.TagBrush)})},
  3221. args: ["aBlock"],
  3222. source: "onSubmit: aBlock\x0a\x09self asJQuery bind: 'submit' do: aBlock",
  3223. messageSends: ["bind:do:", "asJQuery"],
  3224. referencedClasses: []
  3225. }),
  3226. smalltalk.TagBrush);
  3227. smalltalk.addMethod(
  3228. smalltalk.method({
  3229. selector: "onUnload:",
  3230. category: 'events',
  3231. fn: function (aBlock){
  3232. var self=this;
  3233. return smalltalk.withContext(function($ctx1) {
  3234. _st(self._asJQuery())._bind_do_("unload",aBlock);
  3235. return self}, function($ctx1) {$ctx1.fill(self,"onUnload:",{aBlock:aBlock},smalltalk.TagBrush)})},
  3236. args: ["aBlock"],
  3237. source: "onUnload: aBlock\x0a\x09self asJQuery bind: 'unload' do: aBlock",
  3238. messageSends: ["bind:do:", "asJQuery"],
  3239. referencedClasses: []
  3240. }),
  3241. smalltalk.TagBrush);
  3242. smalltalk.addMethod(
  3243. smalltalk.method({
  3244. selector: "placeholder:",
  3245. category: 'attributes',
  3246. fn: function (aString){
  3247. var self=this;
  3248. return smalltalk.withContext(function($ctx1) {
  3249. self._at_put_("placeholder",aString);
  3250. return self}, function($ctx1) {$ctx1.fill(self,"placeholder:",{aString:aString},smalltalk.TagBrush)})},
  3251. args: ["aString"],
  3252. source: "placeholder: aString\x0a\x09self at: 'placeholder' put: aString",
  3253. messageSends: ["at:put:"],
  3254. referencedClasses: []
  3255. }),
  3256. smalltalk.TagBrush);
  3257. smalltalk.addMethod(
  3258. smalltalk.method({
  3259. selector: "rel:",
  3260. category: 'attributes',
  3261. fn: function (aString){
  3262. var self=this;
  3263. return smalltalk.withContext(function($ctx1) {
  3264. self._at_put_("rel",aString);
  3265. return self}, function($ctx1) {$ctx1.fill(self,"rel:",{aString:aString},smalltalk.TagBrush)})},
  3266. args: ["aString"],
  3267. source: "rel: aString\x0a\x09self at: 'rel' put: aString",
  3268. messageSends: ["at:put:"],
  3269. referencedClasses: []
  3270. }),
  3271. smalltalk.TagBrush);
  3272. smalltalk.addMethod(
  3273. smalltalk.method({
  3274. selector: "removeAt:",
  3275. category: 'attributes',
  3276. fn: function (aString){
  3277. var self=this;
  3278. return smalltalk.withContext(function($ctx1) {
  3279. self['@element'].removeAttribute(aString);
  3280. return self}, function($ctx1) {$ctx1.fill(self,"removeAt:",{aString:aString},smalltalk.TagBrush)})},
  3281. args: ["aString"],
  3282. source: "removeAt: aString\x0a\x09<self['@element'].removeAttribute(aString)>",
  3283. messageSends: [],
  3284. referencedClasses: []
  3285. }),
  3286. smalltalk.TagBrush);
  3287. smalltalk.addMethod(
  3288. smalltalk.method({
  3289. selector: "rows:",
  3290. category: 'attributes',
  3291. fn: function (aString){
  3292. var self=this;
  3293. return smalltalk.withContext(function($ctx1) {
  3294. self._at_put_("rows",aString);
  3295. return self}, function($ctx1) {$ctx1.fill(self,"rows:",{aString:aString},smalltalk.TagBrush)})},
  3296. args: ["aString"],
  3297. source: "rows: aString\x0a\x09self at: 'rows' put: aString",
  3298. messageSends: ["at:put:"],
  3299. referencedClasses: []
  3300. }),
  3301. smalltalk.TagBrush);
  3302. smalltalk.addMethod(
  3303. smalltalk.method({
  3304. selector: "src:",
  3305. category: 'attributes',
  3306. fn: function (aString){
  3307. var self=this;
  3308. return smalltalk.withContext(function($ctx1) {
  3309. self._at_put_("src",aString);
  3310. return self}, function($ctx1) {$ctx1.fill(self,"src:",{aString:aString},smalltalk.TagBrush)})},
  3311. args: ["aString"],
  3312. source: "src: aString\x0a\x09self at: 'src' put: aString",
  3313. messageSends: ["at:put:"],
  3314. referencedClasses: []
  3315. }),
  3316. smalltalk.TagBrush);
  3317. smalltalk.addMethod(
  3318. smalltalk.method({
  3319. selector: "style:",
  3320. category: 'attributes',
  3321. fn: function (aString){
  3322. var self=this;
  3323. return smalltalk.withContext(function($ctx1) {
  3324. self._at_put_("style",aString);
  3325. return self}, function($ctx1) {$ctx1.fill(self,"style:",{aString:aString},smalltalk.TagBrush)})},
  3326. args: ["aString"],
  3327. source: "style: aString\x0a\x09self at: 'style' put: aString",
  3328. messageSends: ["at:put:"],
  3329. referencedClasses: []
  3330. }),
  3331. smalltalk.TagBrush);
  3332. smalltalk.addMethod(
  3333. smalltalk.method({
  3334. selector: "tabindex:",
  3335. category: 'attributes',
  3336. fn: function (aNumber){
  3337. var self=this;
  3338. return smalltalk.withContext(function($ctx1) {
  3339. self._at_put_("tabindex",aNumber);
  3340. return self}, function($ctx1) {$ctx1.fill(self,"tabindex:",{aNumber:aNumber},smalltalk.TagBrush)})},
  3341. args: ["aNumber"],
  3342. source: "tabindex: aNumber\x0a\x09self at: 'tabindex' put: aNumber",
  3343. messageSends: ["at:put:"],
  3344. referencedClasses: []
  3345. }),
  3346. smalltalk.TagBrush);
  3347. smalltalk.addMethod(
  3348. smalltalk.method({
  3349. selector: "target:",
  3350. category: 'attributes',
  3351. fn: function (aString){
  3352. var self=this;
  3353. return smalltalk.withContext(function($ctx1) {
  3354. self._at_put_("target",aString);
  3355. return self}, function($ctx1) {$ctx1.fill(self,"target:",{aString:aString},smalltalk.TagBrush)})},
  3356. args: ["aString"],
  3357. source: "target: aString\x0a\x09self at: 'target' put: aString",
  3358. messageSends: ["at:put:"],
  3359. referencedClasses: []
  3360. }),
  3361. smalltalk.TagBrush);
  3362. smalltalk.addMethod(
  3363. smalltalk.method({
  3364. selector: "title:",
  3365. category: 'attributes',
  3366. fn: function (aString){
  3367. var self=this;
  3368. return smalltalk.withContext(function($ctx1) {
  3369. self._at_put_("title",aString);
  3370. return self}, function($ctx1) {$ctx1.fill(self,"title:",{aString:aString},smalltalk.TagBrush)})},
  3371. args: ["aString"],
  3372. source: "title: aString\x0a\x09self at: 'title' put: aString",
  3373. messageSends: ["at:put:"],
  3374. referencedClasses: []
  3375. }),
  3376. smalltalk.TagBrush);
  3377. smalltalk.addMethod(
  3378. smalltalk.method({
  3379. selector: "type:",
  3380. category: 'attributes',
  3381. fn: function (aString){
  3382. var self=this;
  3383. return smalltalk.withContext(function($ctx1) {
  3384. self._at_put_("type",aString);
  3385. return self}, function($ctx1) {$ctx1.fill(self,"type:",{aString:aString},smalltalk.TagBrush)})},
  3386. args: ["aString"],
  3387. source: "type: aString\x0a\x09self at: 'type' put: aString",
  3388. messageSends: ["at:put:"],
  3389. referencedClasses: []
  3390. }),
  3391. smalltalk.TagBrush);
  3392. smalltalk.addMethod(
  3393. smalltalk.method({
  3394. selector: "valign:",
  3395. category: 'attributes',
  3396. fn: function (aString){
  3397. var self=this;
  3398. return smalltalk.withContext(function($ctx1) {
  3399. self._at_put_("valign",aString);
  3400. return self}, function($ctx1) {$ctx1.fill(self,"valign:",{aString:aString},smalltalk.TagBrush)})},
  3401. args: ["aString"],
  3402. source: "valign: aString\x0a\x09self at: 'valign' put: aString",
  3403. messageSends: ["at:put:"],
  3404. referencedClasses: []
  3405. }),
  3406. smalltalk.TagBrush);
  3407. smalltalk.addMethod(
  3408. smalltalk.method({
  3409. selector: "value:",
  3410. category: 'attributes',
  3411. fn: function (aString){
  3412. var self=this;
  3413. return smalltalk.withContext(function($ctx1) {
  3414. self._at_put_("value",aString);
  3415. return self}, function($ctx1) {$ctx1.fill(self,"value:",{aString:aString},smalltalk.TagBrush)})},
  3416. args: ["aString"],
  3417. source: "value: aString\x0a\x09self at: 'value' put: aString",
  3418. messageSends: ["at:put:"],
  3419. referencedClasses: []
  3420. }),
  3421. smalltalk.TagBrush);
  3422. smalltalk.addMethod(
  3423. smalltalk.method({
  3424. selector: "width:",
  3425. category: 'attributes',
  3426. fn: function (aString){
  3427. var self=this;
  3428. return smalltalk.withContext(function($ctx1) {
  3429. self._at_put_("width",aString);
  3430. return self}, function($ctx1) {$ctx1.fill(self,"width:",{aString:aString},smalltalk.TagBrush)})},
  3431. args: ["aString"],
  3432. source: "width: aString\x0a\x09self at: 'width' put: aString",
  3433. messageSends: ["at:put:"],
  3434. referencedClasses: []
  3435. }),
  3436. smalltalk.TagBrush);
  3437. smalltalk.addMethod(
  3438. smalltalk.method({
  3439. selector: "with:",
  3440. category: 'adding',
  3441. fn: function (anObject){
  3442. var self=this;
  3443. return smalltalk.withContext(function($ctx1) {
  3444. self._append_(anObject);
  3445. return self}, function($ctx1) {$ctx1.fill(self,"with:",{anObject:anObject},smalltalk.TagBrush)})},
  3446. args: ["anObject"],
  3447. source: "with: anObject\x0a\x09self append: anObject",
  3448. messageSends: ["append:"],
  3449. referencedClasses: []
  3450. }),
  3451. smalltalk.TagBrush);
  3452. smalltalk.addMethod(
  3453. smalltalk.method({
  3454. selector: "fromJQuery:canvas:",
  3455. category: 'instance creation',
  3456. fn: function (aJQuery,aCanvas){
  3457. var self=this;
  3458. return smalltalk.withContext(function($ctx1) {
  3459. var $2,$3,$1;
  3460. $2=self._new();
  3461. _st($2)._initializeFromJQuery_canvas_(aJQuery,aCanvas);
  3462. $3=_st($2)._yourself();
  3463. $1=$3;
  3464. return $1;
  3465. }, function($ctx1) {$ctx1.fill(self,"fromJQuery:canvas:",{aJQuery:aJQuery,aCanvas:aCanvas},smalltalk.TagBrush.klass)})},
  3466. args: ["aJQuery", "aCanvas"],
  3467. source: "fromJQuery: aJQuery canvas: aCanvas\x0a\x09^self new\x0a\x09\x09initializeFromJQuery: aJQuery canvas: aCanvas;\x0a\x09\x09yourself",
  3468. messageSends: ["initializeFromJQuery:canvas:", "new", "yourself"],
  3469. referencedClasses: []
  3470. }),
  3471. smalltalk.TagBrush.klass);
  3472. smalltalk.addMethod(
  3473. smalltalk.method({
  3474. selector: "fromString:canvas:",
  3475. category: 'instance creation',
  3476. fn: function (aString,aCanvas){
  3477. var self=this;
  3478. return smalltalk.withContext(function($ctx1) {
  3479. var $2,$3,$1;
  3480. $2=self._new();
  3481. _st($2)._initializeFromString_canvas_(aString,aCanvas);
  3482. $3=_st($2)._yourself();
  3483. $1=$3;
  3484. return $1;
  3485. }, function($ctx1) {$ctx1.fill(self,"fromString:canvas:",{aString:aString,aCanvas:aCanvas},smalltalk.TagBrush.klass)})},
  3486. args: ["aString", "aCanvas"],
  3487. source: "fromString: aString canvas: aCanvas\x0a\x09^self new\x0a\x09initializeFromString: aString canvas: aCanvas;\x0a\x09yourself",
  3488. messageSends: ["initializeFromString:canvas:", "new", "yourself"],
  3489. referencedClasses: []
  3490. }),
  3491. smalltalk.TagBrush.klass);
  3492. smalltalk.addClass('DocumentFragmentTag', smalltalk.TagBrush, [], 'Canvas');
  3493. smalltalk.addMethod(
  3494. smalltalk.method({
  3495. selector: "createDocumentFragment",
  3496. category: 'private',
  3497. fn: function (){
  3498. var self=this;
  3499. return smalltalk.withContext(function($ctx1) {
  3500. return document.createDocumentFragment();
  3501. return self}, function($ctx1) {$ctx1.fill(self,"createDocumentFragment",{},smalltalk.DocumentFragmentTag)})},
  3502. args: [],
  3503. source: "createDocumentFragment\x0a\x09<return document.createDocumentFragment()>",
  3504. messageSends: [],
  3505. referencedClasses: []
  3506. }),
  3507. smalltalk.DocumentFragmentTag);
  3508. smalltalk.addMethod(
  3509. smalltalk.method({
  3510. selector: "initializeFromCanvas:",
  3511. category: 'initialization',
  3512. fn: function (aCanvas){
  3513. var self=this;
  3514. return smalltalk.withContext(function($ctx1) {
  3515. self["@canvas"]=aCanvas;
  3516. self["@element"]=self._createDocumentFragment();
  3517. return self}, function($ctx1) {$ctx1.fill(self,"initializeFromCanvas:",{aCanvas:aCanvas},smalltalk.DocumentFragmentTag)})},
  3518. args: ["aCanvas"],
  3519. source: "initializeFromCanvas: aCanvas\x0a\x09canvas := aCanvas.\x0a\x09element := self createDocumentFragment",
  3520. messageSends: ["createDocumentFragment"],
  3521. referencedClasses: []
  3522. }),
  3523. smalltalk.DocumentFragmentTag);
  3524. smalltalk.addMethod(
  3525. smalltalk.method({
  3526. selector: "canvas:",
  3527. category: 'instance creation',
  3528. fn: function (aCanvas){
  3529. var self=this;
  3530. return smalltalk.withContext(function($ctx1) {
  3531. var $2,$3,$1;
  3532. $2=self._new();
  3533. _st($2)._initializeFromCanvas_(aCanvas);
  3534. $3=_st($2)._yourself();
  3535. $1=$3;
  3536. return $1;
  3537. }, function($ctx1) {$ctx1.fill(self,"canvas:",{aCanvas:aCanvas},smalltalk.DocumentFragmentTag.klass)})},
  3538. args: ["aCanvas"],
  3539. source: "canvas: aCanvas\x0a\x09^ self new\x0a\x09\x09initializeFromCanvas: aCanvas;\x0a\x09\x09yourself",
  3540. messageSends: ["initializeFromCanvas:", "new", "yourself"],
  3541. referencedClasses: []
  3542. }),
  3543. smalltalk.DocumentFragmentTag.klass);
  3544. smalltalk.addClass('StyleTag', smalltalk.TagBrush, [], 'Canvas');
  3545. smalltalk.StyleTag.comment="I'm a `<style>` tag use to inline CSS or load a stylesheet.\x0a\x0a## Motivation\x0a\x0aThe need for a specific class comes from Internet Explorer compatibility issues.";
  3546. smalltalk.addMethod(
  3547. smalltalk.method({
  3548. selector: "with:",
  3549. category: 'adding',
  3550. fn: function (aString){
  3551. var self=this;
  3552. function $HTMLCanvas(){return smalltalk.HTMLCanvas||(typeof HTMLCanvas=="undefined"?nil:HTMLCanvas)}
  3553. return smalltalk.withContext(function($ctx1) {
  3554. var $1;
  3555. $1=_st($HTMLCanvas())._isMSIE();
  3556. if(smalltalk.assert($1)){
  3557. _st(_st(self._element())._styleSheet())._cssText_(aString);
  3558. } else {
  3559. smalltalk.StyleTag.superclass.fn.prototype._with_.apply(_st(self), [aString]);
  3560. };
  3561. return self}, function($ctx1) {$ctx1.fill(self,"with:",{aString:aString},smalltalk.StyleTag)})},
  3562. args: ["aString"],
  3563. source: "with: aString\x0a\x09HTMLCanvas isMSIE\x0a\x09\x09ifTrue: [self element styleSheet cssText: aString ]\x0a\x09\x09ifFalse: [super with: aString ].",
  3564. messageSends: ["ifTrue:ifFalse:", "isMSIE", "cssText:", "styleSheet", "element", "with:"],
  3565. referencedClasses: ["HTMLCanvas"]
  3566. }),
  3567. smalltalk.StyleTag);
  3568. smalltalk.addMethod(
  3569. smalltalk.method({
  3570. selector: "canvas:",
  3571. category: 'instance creation',
  3572. fn: function (aCanvas){
  3573. var self=this;
  3574. return smalltalk.withContext(function($ctx1) {
  3575. var $2,$3,$1;
  3576. $2=self._new();
  3577. _st($2)._initializeFromString_canvas_("style",aCanvas);
  3578. $3=_st($2)._yourself();
  3579. $1=$3;
  3580. return $1;
  3581. }, function($ctx1) {$ctx1.fill(self,"canvas:",{aCanvas:aCanvas},smalltalk.StyleTag.klass)})},
  3582. args: ["aCanvas"],
  3583. source: "canvas: aCanvas\x0a\x09^self new\x0a\x09initializeFromString: 'style' canvas: aCanvas;\x0a\x09yourself",
  3584. messageSends: ["initializeFromString:canvas:", "new", "yourself"],
  3585. referencedClasses: []
  3586. }),
  3587. smalltalk.StyleTag.klass);
  3588. smalltalk.addClass('Widget', smalltalk.InterfacingObject, [], 'Canvas');
  3589. smalltalk.Widget.comment="I am a presenter building HTML. Subclasses are typically reusable components.\x0a\x0a## API\x0a\x0aUse `#renderContentOn:` to build HTML. (See `HTMLCanvas` and `TagBrush` classes for more about building HTML).\x0a\x0aTo add a widget to the page, the convenience method `#appendToJQuery:` is very useful.\x0a\x0aExemple: \x0a\x0a Counter new appendToJQuery: 'body' asJQuery";
  3590. smalltalk.addMethod(
  3591. smalltalk.method({
  3592. selector: "appendToBrush:",
  3593. category: 'adding',
  3594. fn: function (aTagBrush){
  3595. var self=this;
  3596. return smalltalk.withContext(function($ctx1) {
  3597. self._appendToJQuery_(_st(aTagBrush)._asJQuery());
  3598. return self}, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},smalltalk.Widget)})},
  3599. args: ["aTagBrush"],
  3600. source: "appendToBrush: aTagBrush\x0a\x09self appendToJQuery: aTagBrush asJQuery",
  3601. messageSends: ["appendToJQuery:", "asJQuery"],
  3602. referencedClasses: []
  3603. }),
  3604. smalltalk.Widget);
  3605. smalltalk.addMethod(
  3606. smalltalk.method({
  3607. selector: "appendToJQuery:",
  3608. category: 'adding',
  3609. fn: function (aJQuery){
  3610. var self=this;
  3611. function $HTMLCanvas(){return smalltalk.HTMLCanvas||(typeof HTMLCanvas=="undefined"?nil:HTMLCanvas)}
  3612. return smalltalk.withContext(function($ctx1) {
  3613. self._renderOn_(_st($HTMLCanvas())._onJQuery_(aJQuery));
  3614. return self}, function($ctx1) {$ctx1.fill(self,"appendToJQuery:",{aJQuery:aJQuery},smalltalk.Widget)})},
  3615. args: ["aJQuery"],
  3616. source: "appendToJQuery: aJQuery\x0a\x09self renderOn: (HTMLCanvas onJQuery: aJQuery)",
  3617. messageSends: ["renderOn:", "onJQuery:"],
  3618. referencedClasses: ["HTMLCanvas"]
  3619. }),
  3620. smalltalk.Widget);
  3621. smalltalk.addMethod(
  3622. smalltalk.method({
  3623. selector: "renderOn:",
  3624. category: 'rendering',
  3625. fn: function (html){
  3626. var self=this;
  3627. return smalltalk.withContext(function($ctx1) {
  3628. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.Widget)})},
  3629. args: ["html"],
  3630. source: "renderOn: html\x0a\x09self",
  3631. messageSends: [],
  3632. referencedClasses: []
  3633. }),
  3634. smalltalk.Widget);
  3635. smalltalk.addMethod(
  3636. smalltalk.method({
  3637. selector: "heliosClass",
  3638. category: 'helios',
  3639. fn: function (){
  3640. var self=this;
  3641. return smalltalk.withContext(function($ctx1) {
  3642. return "widget";
  3643. }, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Widget.klass)})},
  3644. args: [],
  3645. source: "heliosClass\x0a\x09^ 'widget'",
  3646. messageSends: [],
  3647. referencedClasses: []
  3648. }),
  3649. smalltalk.Widget.klass);
  3650. smalltalk.addMethod(
  3651. smalltalk.method({
  3652. selector: "appendToBrush:",
  3653. category: '*Canvas',
  3654. fn: function (aTagBrush){
  3655. var self=this;
  3656. return smalltalk.withContext(function($ctx1) {
  3657. _st(aTagBrush)._append_(self._asString());
  3658. return self}, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},smalltalk.Object)})},
  3659. args: ["aTagBrush"],
  3660. source: "appendToBrush: aTagBrush\x0a\x09aTagBrush append: self asString",
  3661. messageSends: ["append:", "asString"],
  3662. referencedClasses: []
  3663. }),
  3664. smalltalk.Object);
  3665. smalltalk.addMethod(
  3666. smalltalk.method({
  3667. selector: "appendToJQuery:",
  3668. category: '*Canvas',
  3669. fn: function (aJQuery){
  3670. var self=this;
  3671. return smalltalk.withContext(function($ctx1) {
  3672. _st(aJQuery)._append_(self._asString());
  3673. return self}, function($ctx1) {$ctx1.fill(self,"appendToJQuery:",{aJQuery:aJQuery},smalltalk.Object)})},
  3674. args: ["aJQuery"],
  3675. source: "appendToJQuery: aJQuery\x0a\x09aJQuery append: self asString",
  3676. messageSends: ["append:", "asString"],
  3677. referencedClasses: []
  3678. }),
  3679. smalltalk.Object);
  3680. smalltalk.addMethod(
  3681. smalltalk.method({
  3682. selector: "appendToBrush:",
  3683. category: '*Canvas',
  3684. fn: function (aTagBrush){
  3685. var self=this;
  3686. return smalltalk.withContext(function($ctx1) {
  3687. _st(aTagBrush)._appendBlock_(self);
  3688. return self}, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},smalltalk.BlockClosure)})},
  3689. args: ["aTagBrush"],
  3690. source: "appendToBrush: aTagBrush\x0a\x09aTagBrush appendBlock: self",
  3691. messageSends: ["appendBlock:"],
  3692. referencedClasses: []
  3693. }),
  3694. smalltalk.BlockClosure);
  3695. smalltalk.addMethod(
  3696. smalltalk.method({
  3697. selector: "appendToJQuery:",
  3698. category: '*Canvas',
  3699. fn: function (aJQuery){
  3700. var self=this;
  3701. function $HTMLCanvas(){return smalltalk.HTMLCanvas||(typeof HTMLCanvas=="undefined"?nil:HTMLCanvas)}
  3702. return smalltalk.withContext(function($ctx1) {
  3703. self._value_(_st($HTMLCanvas())._onJQuery_(aJQuery));
  3704. return self}, function($ctx1) {$ctx1.fill(self,"appendToJQuery:",{aJQuery:aJQuery},smalltalk.BlockClosure)})},
  3705. args: ["aJQuery"],
  3706. source: "appendToJQuery: aJQuery\x0a\x09self value: (HTMLCanvas onJQuery: aJQuery)",
  3707. messageSends: ["value:", "onJQuery:"],
  3708. referencedClasses: ["HTMLCanvas"]
  3709. }),
  3710. smalltalk.BlockClosure);
  3711. smalltalk.addMethod(
  3712. smalltalk.method({
  3713. selector: "asSnippet",
  3714. category: '*Canvas',
  3715. fn: function (){
  3716. var self=this;
  3717. function $HTMLSnippet(){return smalltalk.HTMLSnippet||(typeof HTMLSnippet=="undefined"?nil:HTMLSnippet)}
  3718. return smalltalk.withContext(function($ctx1) {
  3719. var $1;
  3720. $1=_st(_st($HTMLSnippet())._current())._snippetAt_(self._asString());
  3721. return $1;
  3722. }, function($ctx1) {$ctx1.fill(self,"asSnippet",{},smalltalk.CharacterArray)})},
  3723. args: [],
  3724. source: "asSnippet\x0a\x09^ HTMLSnippet current snippetAt: self asString",
  3725. messageSends: ["snippetAt:", "current", "asString"],
  3726. referencedClasses: ["HTMLSnippet"]
  3727. }),
  3728. smalltalk.CharacterArray);
  3729. smalltalk.addMethod(
  3730. smalltalk.method({
  3731. selector: "appendToBrush:",
  3732. category: '*Canvas',
  3733. fn: function (aTagBrush){
  3734. var self=this;
  3735. return smalltalk.withContext(function($ctx1) {
  3736. _st(aTagBrush)._appendString_(self);
  3737. return self}, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},smalltalk.String)})},
  3738. args: ["aTagBrush"],
  3739. source: "appendToBrush: aTagBrush\x0a\x09aTagBrush appendString: self",
  3740. messageSends: ["appendString:"],
  3741. referencedClasses: []
  3742. }),
  3743. smalltalk.String);
  3744. smalltalk.addMethod(
  3745. smalltalk.method({
  3746. selector: "appendToJQuery:",
  3747. category: '*Canvas',
  3748. fn: function (aJQuery){
  3749. var self=this;
  3750. return smalltalk.withContext(function($ctx1) {
  3751. _st(aJQuery)._append_(self);
  3752. return self}, function($ctx1) {$ctx1.fill(self,"appendToJQuery:",{aJQuery:aJQuery},smalltalk.String)})},
  3753. args: ["aJQuery"],
  3754. source: "appendToJQuery: aJQuery\x0a\x09aJQuery append: self",
  3755. messageSends: ["append:"],
  3756. referencedClasses: []
  3757. }),
  3758. smalltalk.String);
  3759. smalltalk.addMethod(
  3760. smalltalk.method({
  3761. selector: "asJQuery",
  3762. category: '*Canvas',
  3763. fn: function (){
  3764. var self=this;
  3765. return smalltalk.withContext(function($ctx1) {
  3766. return jQuery(String(self));
  3767. return self}, function($ctx1) {$ctx1.fill(self,"asJQuery",{},smalltalk.String)})},
  3768. args: [],
  3769. source: "asJQuery\x0a\x09<return jQuery(String(self))>",
  3770. messageSends: [],
  3771. referencedClasses: []
  3772. }),
  3773. smalltalk.String);
  3774. smalltalk.addMethod(
  3775. smalltalk.method({
  3776. selector: "asJQuery",
  3777. category: '*Canvas',
  3778. fn: function (){
  3779. var self=this;
  3780. return smalltalk.withContext(function($ctx1) {
  3781. return jQuery(self['@jsObject']);
  3782. return self}, function($ctx1) {$ctx1.fill(self,"asJQuery",{},smalltalk.JSObjectProxy)})},
  3783. args: [],
  3784. source: "asJQuery\x0a\x09<return jQuery(self['@jsObject'])>",
  3785. messageSends: [],
  3786. referencedClasses: []
  3787. }),
  3788. smalltalk.JSObjectProxy);
  3789. });