Canvas.js 113 KB

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