Canvas.js 107 KB

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