2
0

Canvas.js 112 KB

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