Canvas.js 113 KB

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