2
0

Canvas.js 112 KB

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