Canvas.js 114 KB

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