2
0

Canvas.js 108 KB

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