123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017 |
- 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){
- smalltalk.addPackage('Canvas');
- smalltalk.packages["Canvas"].transport = {"type":"amd","amdNamespace":"amber_core"};
- smalltalk.addClass('BrowserInterface', smalltalk.Object, [], 'Canvas');
- 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 }.";
- smalltalk.addMethod(
- smalltalk.method({
- selector: "ajax:",
- category: 'actions',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(jQuery)._ajax_(anObject);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},smalltalk.BrowserInterface)})},
- args: ["anObject"],
- source: "ajax: anObject\x0a\x09^jQuery ajax: anObject",
- messageSends: ["ajax:"],
- referencedClasses: []
- }),
- smalltalk.BrowserInterface);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "alert:",
- category: 'actions',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(window)._alert_(aString);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.BrowserInterface)})},
- args: ["aString"],
- source: "alert: aString\x0a\x09^window alert: aString",
- messageSends: ["alert:"],
- referencedClasses: []
- }),
- smalltalk.BrowserInterface);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "confirm:",
- category: 'actions',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(window)._confirm_(aString);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},smalltalk.BrowserInterface)})},
- args: ["aString"],
- source: "confirm: aString\x0a\x09^window confirm: aString",
- messageSends: ["confirm:"],
- referencedClasses: []
- }),
- smalltalk.BrowserInterface);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "isAvailable",
- category: 'testing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- return typeof window !== "undefined" && typeof jQuery !== "undefined";
- return self}, function($ctx1) {$ctx1.fill(self,"isAvailable",{},smalltalk.BrowserInterface)})},
- args: [],
- source: "isAvailable\x0a<return typeof window !== \x22undefined\x22 && typeof jQuery !== \x22undefined\x22>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.BrowserInterface);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "prompt:",
- category: 'actions',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(window)._prompt_(aString);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},smalltalk.BrowserInterface)})},
- args: ["aString"],
- source: "prompt: aString\x0a\x09^window prompt: aString",
- messageSends: ["prompt:"],
- referencedClasses: []
- }),
- smalltalk.BrowserInterface);
- smalltalk.BrowserInterface.klass.iVarNames = ['uiWorker','ajaxWorker'];
- smalltalk.addClass('HTMLCanvas', smalltalk.Object, ['root'], 'Canvas');
- 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!' ]";
- smalltalk.addMethod(
- smalltalk.method({
- selector: "a",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("a");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"a",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "a\x0a\x09^self tag: 'a'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "abbr",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("abbr");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"abbr",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "abbr\x0a\x09^self tag: 'abbr'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "address",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("address");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"address",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "address\x0a\x09^self tag: 'address'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "area",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("area");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"area",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "area\x0a\x09^self tag: 'area'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "article",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("article");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"article",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "article\x0a\x09^self tag: 'article'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "aside",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("aside");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"aside",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "aside\x0a\x09^self tag: 'aside'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "audio",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("audio");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"audio",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "audio\x0a\x09^self tag: 'audio'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "base",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("base");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"base",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "base\x0a\x09^self tag: 'base'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "blockquote",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("blockquote");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"blockquote",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "blockquote\x0a\x09^self tag: 'blockquote'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "body",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("body");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"body",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "body\x0a\x09^self tag: 'body'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "br",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("br");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"br",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "br\x0a\x09^self tag: 'br'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "button",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("button");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"button",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "button\x0a\x09^self tag: 'button'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "canvas",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("canvas");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"canvas",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "canvas\x0a\x09^self tag: 'canvas'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "caption",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("caption");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"caption",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "caption\x0a\x09^self tag: 'caption'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "cite",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("cite");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"cite",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "cite\x0a\x09^self tag: 'cite'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "code",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("code");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"code",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "code\x0a\x09^self tag: 'code'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "col",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("col");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"col",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "col\x0a\x09^self tag: 'col'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "colgroup",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("colgroup");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"colgroup",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "colgroup\x0a\x09^self tag: 'colgroup'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "command",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("command");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"command",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "command\x0a\x09^self tag: 'command'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "datalist",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("datalist");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"datalist",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "datalist\x0a\x09^self tag: 'datalist'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "dd",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("dd");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"dd",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "dd\x0a\x09^self tag: 'dd'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "del",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("del");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"del",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "del\x0a\x09^self tag: 'del'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "details",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("details");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"details",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "details\x0a\x09^self tag: 'details'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "div",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("div");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"div",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "div\x0a\x09^self tag: 'div'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "div:",
- category: 'tags',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._div())._with_(aBlock);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"div:",{aBlock:aBlock},smalltalk.HTMLCanvas)})},
- args: ["aBlock"],
- source: "div: aBlock\x0a\x09^self div with: aBlock",
- messageSends: ["with:", "div"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "dl",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("dl");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"dl",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "dl\x0a\x09^self tag: 'dl'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "dt",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("dt");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"dt",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "dt\x0a\x09^self tag: 'dt'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "em",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("em");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"em",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "em\x0a\x09^self tag: 'em'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "embed",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("embed");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"embed",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "embed\x0a\x09^self tag: 'embed'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "entity:",
- category: 'adding',
- fn: function (aString){
- var self=this;
- var result;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- result=_st(_st("<span />"._asJQuery())._html_(_st("&".__comma(aString)).__comma(";")))._text();
- $1=_st(_st(result)._size()).__eq((1));
- if(! smalltalk.assert($1)){
- self._error_("Not an HTML entity: ".__comma(aString));
- };
- self._with_(result);
- return self}, function($ctx1) {$ctx1.fill(self,"entity:",{aString:aString,result:result},smalltalk.HTMLCanvas)})},
- args: ["aString"],
- 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",
- messageSends: ["text", "html:", "asJQuery", ",", "ifFalse:", "=", "size", "error:", "with:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "fieldset",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("fieldset");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"fieldset",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "fieldset\x0a\x09^self tag: 'fieldset'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "figcaption",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("figcaption");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"figcaption",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "figcaption\x0a\x09^self tag: 'figcaption'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "figure",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("figure");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"figure",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "figure\x0a\x09^self tag: 'figure'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "footer",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("footer");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"footer",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "footer\x0a\x09^self tag: 'footer'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "form",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("form");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"form",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "form\x0a\x09^self tag: 'form'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "h1",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("h1");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"h1",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "h1\x0a\x09^self tag: 'h1'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "h1:",
- category: 'tags',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._h1())._with_(anObject);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"h1:",{anObject:anObject},smalltalk.HTMLCanvas)})},
- args: ["anObject"],
- source: "h1: anObject\x0a\x09^self h1 with: anObject",
- messageSends: ["with:", "h1"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "h2",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("h2");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"h2",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "h2\x0a\x09^self tag: 'h2'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "h2:",
- category: 'tags',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._h2())._with_(anObject);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"h2:",{anObject:anObject},smalltalk.HTMLCanvas)})},
- args: ["anObject"],
- source: "h2: anObject\x0a\x09^ self h2 with: anObject",
- messageSends: ["with:", "h2"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "h3",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("h3");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"h3",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "h3\x0a\x09^self tag: 'h3'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "h3:",
- category: 'tags',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._h3())._with_(anObject);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"h3:",{anObject:anObject},smalltalk.HTMLCanvas)})},
- args: ["anObject"],
- source: "h3: anObject\x0a\x09^self h3 with: anObject",
- messageSends: ["with:", "h3"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "h4",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("h4");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"h4",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "h4\x0a\x09^self tag: 'h4'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "h4:",
- category: 'tags',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._h4())._with_(anObject);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"h4:",{anObject:anObject},smalltalk.HTMLCanvas)})},
- args: ["anObject"],
- source: "h4: anObject\x0a\x09^self h4 with: anObject",
- messageSends: ["with:", "h4"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "h5",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("h5");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"h5",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "h5\x0a\x09^self tag: 'h5'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "h5:",
- category: 'tags',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._h5())._with_(anObject);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"h5:",{anObject:anObject},smalltalk.HTMLCanvas)})},
- args: ["anObject"],
- source: "h5: anObject\x0a\x09^self h5 with: anObject",
- messageSends: ["with:", "h5"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "h6",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("h6");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"h6",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "h6\x0a\x09^self tag: 'h6'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "h6:",
- category: 'tags',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._h6())._with_(anObject);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"h6:",{anObject:anObject},smalltalk.HTMLCanvas)})},
- args: ["anObject"],
- source: "h6: anObject\x0a\x09^self h6 with: anObject",
- messageSends: ["with:", "h6"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "head",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("head");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"head",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "head\x0a\x09^self tag: 'head'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "header",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("header");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"header",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "header\x0a\x09^self tag: 'header'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "hgroup",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("hgroup");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"hgroup",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "hgroup\x0a\x09^self tag: 'hgroup'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "hr",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("hr");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"hr",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "hr\x0a\x09^self tag: 'hr'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "html",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("html");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"html",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "html\x0a\x09^self tag: 'html'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "iframe",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("iframe");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"iframe",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "iframe\x0a\x09^self tag: 'iframe'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "iframe:",
- category: 'tags',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._iframe())._src_(aString);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"iframe:",{aString:aString},smalltalk.HTMLCanvas)})},
- args: ["aString"],
- source: "iframe: aString\x0a\x09^self iframe src: aString",
- messageSends: ["src:", "iframe"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "img",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("img");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"img",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "img\x0a\x09^self tag: 'img'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "img:",
- category: 'tags',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._img())._src_(aString);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"img:",{aString:aString},smalltalk.HTMLCanvas)})},
- args: ["aString"],
- source: "img: aString\x0a\x09^self img src: aString",
- messageSends: ["src:", "img"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "initialize",
- category: 'initialization',
- fn: function (){
- var self=this;
- function $TagBrush(){return smalltalk.TagBrush||(typeof TagBrush=="undefined"?nil:TagBrush)}
- return smalltalk.withContext(function($ctx1) {
- var $1;
- smalltalk.HTMLCanvas.superclass.fn.prototype._initialize.apply(_st(self), []);
- $1=self["@root"];
- if(($receiver = $1) == nil || $receiver == null){
- self["@root"]=_st($TagBrush())._fromString_canvas_("div",self);
- self["@root"];
- } else {
- $1;
- };
- return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "initialize\x0a\x09super initialize.\x0a\x09root ifNil: [root := TagBrush fromString: 'div' canvas: self]",
- messageSends: ["initialize", "ifNil:", "fromString:canvas:"],
- referencedClasses: ["TagBrush"]
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "initializeFromJQuery:",
- category: 'initialization',
- fn: function (aJQuery){
- var self=this;
- function $TagBrush(){return smalltalk.TagBrush||(typeof TagBrush=="undefined"?nil:TagBrush)}
- return smalltalk.withContext(function($ctx1) {
- self["@root"]=_st($TagBrush())._fromJQuery_canvas_(aJQuery,self);
- return self}, function($ctx1) {$ctx1.fill(self,"initializeFromJQuery:",{aJQuery:aJQuery},smalltalk.HTMLCanvas)})},
- args: ["aJQuery"],
- source: "initializeFromJQuery: aJQuery\x0a\x09root := TagBrush fromJQuery: aJQuery canvas: self",
- messageSends: ["fromJQuery:canvas:"],
- referencedClasses: ["TagBrush"]
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "input",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("input");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"input",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "input\x0a\x09^self tag: 'input'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "label",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("label");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "label\x0a\x09^self tag: 'label'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "legend",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("legend");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"legend",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "legend\x0a\x09^self tag: 'legend'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "li",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("li");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"li",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "li\x0a\x09^self tag: 'li'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "li:",
- category: 'tags',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._li())._with_(anObject);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"li:",{anObject:anObject},smalltalk.HTMLCanvas)})},
- args: ["anObject"],
- source: "li: anObject\x0a\x09^self li with: anObject",
- messageSends: ["with:", "li"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "link",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("link");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"link",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "link\x0a\x09^self tag: 'link'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "map",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("map");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"map",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "map\x0a\x09^self tag: 'map'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "mark",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("mark");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"mark",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "mark\x0a\x09^self tag: 'mark'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "menu",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("menu");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"menu",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "menu\x0a\x09^self tag: 'menu'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "meta",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("meta");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"meta",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "meta\x0a\x09^self tag: 'meta'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "nav",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("nav");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"nav",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "nav\x0a\x09^self tag: 'nav'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "newTag:",
- category: 'tags',
- fn: function (aString){
- var self=this;
- function $TagBrush(){return smalltalk.TagBrush||(typeof TagBrush=="undefined"?nil:TagBrush)}
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st($TagBrush())._fromString_canvas_(aString,self);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"newTag:",{aString:aString},smalltalk.HTMLCanvas)})},
- args: ["aString"],
- source: "newTag: aString\x0a\x09^TagBrush fromString: aString canvas: self",
- messageSends: ["fromString:canvas:"],
- referencedClasses: ["TagBrush"]
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "noscript",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("noscript");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"noscript",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "noscript\x0a\x09^self tag: 'noscript'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "object",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("object");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"object",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "object\x0a\x09^self tag: 'object'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "ol",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("ol");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"ol",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "ol\x0a\x09^self tag: 'ol'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "ol:",
- category: 'tags',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._ol())._with_(anObject);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"ol:",{anObject:anObject},smalltalk.HTMLCanvas)})},
- args: ["anObject"],
- source: "ol: anObject\x0a\x09^self ol with: anObject",
- messageSends: ["with:", "ol"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "optgroup",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("optgroup");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"optgroup",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "optgroup\x0a\x09^self tag: 'optgroup'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "option",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("option");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"option",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "option\x0a\x09^self tag: 'option'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "output",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("output");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"output",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "output\x0a\x09^self tag: 'output'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "p",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("p");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"p",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "p\x0a\x09^self tag: 'p'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "p:",
- category: 'tags',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._p())._with_(anObject);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"p:",{anObject:anObject},smalltalk.HTMLCanvas)})},
- args: ["anObject"],
- source: "p: anObject\x0a\x09^self p with: anObject",
- messageSends: ["with:", "p"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "param",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("param");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"param",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "param\x0a\x09^self tag: 'param'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "pre",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("pre");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"pre",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "pre\x0a\x09^self tag: 'pre'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "progress",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("progress");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"progress",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "progress\x0a\x09^self tag: 'progress'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "root",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self["@root"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"root",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "root\x0a\x09^root",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "root:",
- category: 'accessing',
- fn: function (aTagBrush){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self["@root"]=aTagBrush;
- return self}, function($ctx1) {$ctx1.fill(self,"root:",{aTagBrush:aTagBrush},smalltalk.HTMLCanvas)})},
- args: ["aTagBrush"],
- source: "root: aTagBrush\x0a\x09root := aTagBrush",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "script",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("script");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"script",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "script\x0a\x09^self tag: 'script'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "section",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("section");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"section",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "section\x0a\x09^self tag: 'section'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "select",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("select");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"select",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "select\x0a\x09^self tag: 'select'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "small",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("small");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"small",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "small\x0a\x09^self tag: 'small'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "snippet:",
- category: 'accessing',
- fn: function (anElement){
- var self=this;
- var clone,caret;
- function $TagBrush(){return smalltalk.TagBrush||(typeof TagBrush=="undefined"?nil:TagBrush)}
- return smalltalk.withContext(function($ctx1) {
- var $1,$2;
- clone=_st(_st(anElement)._asJQuery())._clone();
- self._with_(_st($TagBrush())._fromJQuery_canvas_(clone,self));
- caret=_st(clone)._find_("[data-snippet=\x22*\x22]");
- $1=_st(_st(caret)._toArray())._isEmpty();
- if(smalltalk.assert($1)){
- caret=clone;
- caret;
- };
- $2=_st($TagBrush())._fromJQuery_canvas_(_st(caret)._removeAttr_("data-snippet"),self);
- return $2;
- }, function($ctx1) {$ctx1.fill(self,"snippet:",{anElement:anElement,clone:clone,caret:caret},smalltalk.HTMLCanvas)})},
- args: ["anElement"],
- 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",
- messageSends: ["clone", "asJQuery", "with:", "fromJQuery:canvas:", "find:", "ifTrue:", "isEmpty", "toArray", "removeAttr:"],
- referencedClasses: ["TagBrush"]
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "source",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("source");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "source\x0a\x09^self tag: 'source'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "span",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("span");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"span",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "span\x0a\x09^self tag: 'span'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "span:",
- category: 'tags',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._span())._with_(anObject);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"span:",{anObject:anObject},smalltalk.HTMLCanvas)})},
- args: ["anObject"],
- source: "span: anObject\x0a\x09^self span with: anObject",
- messageSends: ["with:", "span"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "strong",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("strong");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"strong",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "strong\x0a\x09^self tag: 'strong'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "strong:",
- category: 'tags',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._strong())._with_(anObject);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"strong:",{anObject:anObject},smalltalk.HTMLCanvas)})},
- args: ["anObject"],
- source: "strong: anObject\x0a\x09^self strong with: anObject",
- messageSends: ["with:", "strong"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "style",
- category: 'tags',
- fn: function (){
- var self=this;
- function $StyleTag(){return smalltalk.StyleTag||(typeof StyleTag=="undefined"?nil:StyleTag)}
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self["@root"])._addBrush_(_st($StyleTag())._canvas_(self));
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"style",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "style\x0a\x09^ root addBrush: (StyleTag canvas: self)",
- messageSends: ["addBrush:", "canvas:"],
- referencedClasses: ["StyleTag"]
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "style:",
- category: 'tags',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $2,$3,$1;
- $2=self._style();
- _st($2)._with_(aString);
- $3=_st($2)._yourself();
- $1=$3;
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"style:",{aString:aString},smalltalk.HTMLCanvas)})},
- args: ["aString"],
- source: "style: aString\x0a\x09^ self style with: aString; yourself",
- messageSends: ["with:", "style", "yourself"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "sub",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("sub");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"sub",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "sub\x0a\x09^self tag: 'sub'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "summary",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("summary");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"summary",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "summary\x0a\x09^self tag: 'summary'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "sup",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("sup");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"sup",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "sup\x0a\x09^self tag: 'sup'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "table",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("table");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"table",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "table\x0a\x09^self tag: 'table'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "tag:",
- category: 'tags',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self["@root"])._addBrush_(self._newTag_(aString));
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"tag:",{aString:aString},smalltalk.HTMLCanvas)})},
- args: ["aString"],
- source: "tag: aString\x0a\x09^root addBrush: (self newTag: aString)",
- messageSends: ["addBrush:", "newTag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "tbody",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("tbody");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"tbody",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "tbody\x0a\x09^self tag: 'tbody'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "td",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("td");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"td",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "td\x0a\x09^self tag: 'td'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "textarea",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("textarea");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"textarea",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "textarea\x0a\x09^self tag: 'textarea'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "tfoot",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("tfoot");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"tfoot",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "tfoot\x0a\x09^self tag: 'tfoot'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "th",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("th");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"th",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "th\x0a\x09^self tag: 'th'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "thead",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("thead");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"thead",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "thead\x0a\x09^self tag: 'thead'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "time",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("time");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"time",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "time\x0a\x09^self tag: 'time'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "title",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("title");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"title",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "title\x0a\x09^self tag: 'title'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "tr",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("tr");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"tr",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "tr\x0a\x09^self tag: 'tr'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "ul",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("ul");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"ul",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "ul\x0a\x09^self tag: 'ul'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "ul:",
- category: 'tags',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._ul())._with_(anObject);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"ul:",{anObject:anObject},smalltalk.HTMLCanvas)})},
- args: ["anObject"],
- source: "ul: anObject\x0a\x09^self ul with: anObject",
- messageSends: ["with:", "ul"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "video",
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self._tag_("video");
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"video",{},smalltalk.HTMLCanvas)})},
- args: [],
- source: "video\x0a\x09^self tag: 'video'",
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "with:",
- category: 'adding',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._root())._with_(anObject);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"with:",{anObject:anObject},smalltalk.HTMLCanvas)})},
- args: ["anObject"],
- source: "with: anObject\x0a\x09^self root with: anObject",
- messageSends: ["with:", "root"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "browserVersion",
- category: 'instance creation',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(_st(jQuery)._at_("browser"))._version();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"browserVersion",{},smalltalk.HTMLCanvas.klass)})},
- args: [],
- source: "browserVersion\x0a\x09^(jQuery at: #browser) version",
- messageSends: ["version", "at:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas.klass);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "isMSIE",
- category: 'instance creation',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(_st(_st(jQuery)._at_("browser"))._at_("msie"))._notNil();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"isMSIE",{},smalltalk.HTMLCanvas.klass)})},
- args: [],
- source: "isMSIE\x0a\x09^((jQuery at: #browser) at: #msie) notNil",
- messageSends: ["notNil", "at:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas.klass);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "isMozilla",
- category: 'instance creation',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(_st(_st(jQuery)._at_("browser"))._at_("mozilla"))._notNil();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"isMozilla",{},smalltalk.HTMLCanvas.klass)})},
- args: [],
- source: "isMozilla\x0a\x09^((jQuery at: #browser) at: #mozilla) notNil",
- messageSends: ["notNil", "at:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas.klass);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "isOpera",
- category: 'instance creation',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(_st(_st(jQuery)._at_("browser"))._at_("opera"))._notNil();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"isOpera",{},smalltalk.HTMLCanvas.klass)})},
- args: [],
- source: "isOpera\x0a\x09^((jQuery at: #browser) at: #opera) notNil",
- messageSends: ["notNil", "at:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas.klass);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "isWebkit",
- category: 'instance creation',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(_st(_st(jQuery)._at_("browser"))._at_("webkit"))._notNil();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"isWebkit",{},smalltalk.HTMLCanvas.klass)})},
- args: [],
- source: "isWebkit\x0a\x09^((jQuery at: #browser) at: #webkit) notNil",
- messageSends: ["notNil", "at:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas.klass);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onJQuery:",
- category: 'instance creation',
- fn: function (aJQuery){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $2,$3,$1;
- $2=self._basicNew();
- _st($2)._initializeFromJQuery_(aJQuery);
- _st($2)._initialize();
- $3=_st($2)._yourself();
- $1=$3;
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"onJQuery:",{aJQuery:aJQuery},smalltalk.HTMLCanvas.klass)})},
- args: ["aJQuery"],
- source: "onJQuery: aJQuery\x0a\x09^self basicNew\x0a\x09\x09initializeFromJQuery: aJQuery;\x0a\x09\x09initialize;\x0a\x09\x09yourself",
- messageSends: ["initializeFromJQuery:", "basicNew", "initialize", "yourself"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas.klass);
- smalltalk.addClass('HTMLSnippet', smalltalk.Object, ['snippets'], 'Canvas');
- 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>`";
- smalltalk.addMethod(
- smalltalk.method({
- selector: "initializeFromJQuery:",
- category: 'initialization',
- fn: function (aJQuery){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._snippetsFromJQuery_(aJQuery))._do_((function(each){
- return smalltalk.withContext(function($ctx2) {
- return self._installSnippetFromJQuery_(_st(each)._asJQuery());
- }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
- return self}, function($ctx1) {$ctx1.fill(self,"initializeFromJQuery:",{aJQuery:aJQuery},smalltalk.HTMLSnippet)})},
- args: ["aJQuery"],
- 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 ]",
- messageSends: ["do:", "snippetsFromJQuery:", "installSnippetFromJQuery:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.HTMLSnippet);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "installSnippetFromJQuery:",
- category: 'snippet installation',
- fn: function (element){
- var self=this;
- var name;
- return smalltalk.withContext(function($ctx1) {
- var $1,$2;
- name=_st(element)._attr_("data-snippet");
- $1=_st(name).__eq("*");
- if(! smalltalk.assert($1)){
- $2=_st("^\x5c*"._asRegexp())._test_(name);
- if(smalltalk.assert($2)){
- name=_st(name)._allButFirst();
- name;
- _st(element)._attr_put_("data-snippet","*");
- } else {
- _st(element)._removeAttr_("data-snippet");
- };
- self._snippetAt_install_(name,_st(_st(element)._detach())._get_((0)));
- };
- return self}, function($ctx1) {$ctx1.fill(self,"installSnippetFromJQuery:",{element:element,name:name},smalltalk.HTMLSnippet)})},
- args: ["element"],
- 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) ]",
- messageSends: ["attr:", "ifFalse:", "=", "ifTrue:ifFalse:", "test:", "asRegexp", "allButFirst", "attr:put:", "removeAttr:", "snippetAt:install:", "get:", "detach"],
- referencedClasses: []
- }),
- smalltalk.HTMLSnippet);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "snippetAt:",
- category: 'accessing',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._snippets())._at_(aString);
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"snippetAt:",{aString:aString},smalltalk.HTMLSnippet)})},
- args: ["aString"],
- source: "snippetAt: aString\x0a\x09^ self snippets at: aString",
- messageSends: ["at:", "snippets"],
- referencedClasses: []
- }),
- smalltalk.HTMLSnippet);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "snippetAt:compile:",
- category: 'method generation',
- fn: function (aString,anElement){
- var self=this;
- function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
- function $HTMLCanvas(){return smalltalk.HTMLCanvas||(typeof HTMLCanvas=="undefined"?nil:HTMLCanvas)}
- return smalltalk.withContext(function($ctx1) {
- _st(_st($ClassBuilder())._new())._installMethod_forClass_category_(_st(_st((function(htmlReceiver){
- return smalltalk.withContext(function($ctx2) {
- return _st(htmlReceiver)._snippet_(anElement);
- }, function($ctx2) {$ctx2.fillBlock({htmlReceiver:htmlReceiver},$ctx1,1)})}))._currySelf())._asCompiledMethod_(aString),$HTMLCanvas(),"**snippets");
- return self}, function($ctx1) {$ctx1.fill(self,"snippetAt:compile:",{aString:aString,anElement:anElement},smalltalk.HTMLSnippet)})},
- args: ["aString", "anElement"],
- 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'",
- messageSends: ["installMethod:forClass:category:", "new", "asCompiledMethod:", "currySelf", "snippet:"],
- referencedClasses: ["ClassBuilder", "HTMLCanvas"]
- }),
- smalltalk.HTMLSnippet);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "snippetAt:install:",
- category: 'snippet installation',
- fn: function (aString,anElement){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._snippets())._at_put_(aString,anElement);
- self._snippetAt_compile_(aString,anElement);
- return self}, function($ctx1) {$ctx1.fill(self,"snippetAt:install:",{aString:aString,anElement:anElement},smalltalk.HTMLSnippet)})},
- args: ["aString", "anElement"],
- source: "snippetAt: aString install: anElement\x0a\x09self snippets at: aString put: anElement.\x0a\x09self snippetAt: aString compile: anElement",
- messageSends: ["at:put:", "snippets", "snippetAt:compile:"],
- referencedClasses: []
- }),
- smalltalk.HTMLSnippet);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "snippets",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $2,$1;
- $2=self["@snippets"];
- if(($receiver = $2) == nil || $receiver == null){
- self["@snippets"]=smalltalk.HashedCollection._from_([]);
- $1=self["@snippets"];
- } else {
- $1=$2;
- };
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"snippets",{},smalltalk.HTMLSnippet)})},
- args: [],
- source: "snippets\x0a\x09^snippets ifNil: [ snippets := #{} ]",
- messageSends: ["ifNil:"],
- referencedClasses: []
- }),
- smalltalk.HTMLSnippet);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "snippetsFromJQuery:",
- category: 'private',
- fn: function (aJQuery){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(_st(aJQuery)._find_("[data-snippet]"))._toArray();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"snippetsFromJQuery:",{aJQuery:aJQuery},smalltalk.HTMLSnippet)})},
- args: ["aJQuery"],
- source: "snippetsFromJQuery: aJQuery\x0a\x09^ (aJQuery find: '[data-snippet]') toArray",
- messageSends: ["toArray", "find:"],
- referencedClasses: []
- }),
- smalltalk.HTMLSnippet);
- smalltalk.HTMLSnippet.klass.iVarNames = ['current'];
- smalltalk.addMethod(
- smalltalk.method({
- selector: "current",
- category: 'instance creation',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self["@current"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.HTMLSnippet.klass)})},
- args: [],
- source: "current\x0a\x09^ current",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.HTMLSnippet.klass);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "ensureCurrent",
- category: 'initialization',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1,$2,$3;
- $1=self["@current"];
- if(($receiver = $1) == nil || $receiver == null){
- $2=smalltalk.HTMLSnippet.klass.superclass.fn.prototype._new.apply(_st(self), []);
- _st($2)._initializeFromJQuery_(_st(document)._asJQuery());
- $3=_st($2)._yourself();
- self["@current"]=$3;
- self["@current"];
- } else {
- $1;
- };
- return self}, function($ctx1) {$ctx1.fill(self,"ensureCurrent",{},smalltalk.HTMLSnippet.klass)})},
- args: [],
- source: "ensureCurrent\x0a\x09current ifNil: [\x0a\x09\x09current := super new\x0a\x09\x09\x09initializeFromJQuery: document asJQuery;\x0a\x09\x09\x09yourself ]",
- messageSends: ["ifNil:", "initializeFromJQuery:", "new", "asJQuery", "yourself"],
- referencedClasses: []
- }),
- smalltalk.HTMLSnippet.klass);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "initialize",
- category: 'initialization',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- smalltalk.HTMLSnippet.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
- $1=self._isDOMAvailable();
- if(smalltalk.assert($1)){
- self._ensureCurrent();
- };
- return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HTMLSnippet.klass)})},
- args: [],
- source: "initialize\x0a\x09super initialize.\x0a\x09self isDOMAvailable ifTrue: [\x0a\x09\x09self ensureCurrent ]",
- messageSends: ["initialize", "ifTrue:", "isDOMAvailable", "ensureCurrent"],
- referencedClasses: []
- }),
- smalltalk.HTMLSnippet.klass);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "isDOMAvailable",
- category: 'instance creation',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- return typeof document !== 'undefined' ;
- return self}, function($ctx1) {$ctx1.fill(self,"isDOMAvailable",{},smalltalk.HTMLSnippet.klass)})},
- args: [],
- source: "isDOMAvailable\x0a\x09< return typeof document !== 'undefined' >",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.HTMLSnippet.klass);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "new",
- category: 'instance creation',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._shouldNotImplement();
- return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.HTMLSnippet.klass)})},
- args: [],
- source: "new\x0a\x09self shouldNotImplement",
- messageSends: ["shouldNotImplement"],
- referencedClasses: []
- }),
- smalltalk.HTMLSnippet.klass);
- smalltalk.addClass('TagBrush', smalltalk.Object, ['canvas', 'element'], 'Canvas');
- 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'`";
- smalltalk.addMethod(
- smalltalk.method({
- selector: "accesskey:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("accesskey",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"accesskey:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "accesskey: aString\x0a\x09self at: 'accesskey' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "action:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("action",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"action:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "action: aString\x0a\x09self at: 'action' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "addBrush:",
- category: 'adding',
- fn: function (aTagBrush){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- self._appendChild_(_st(aTagBrush)._element());
- $1=aTagBrush;
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"addBrush:",{aTagBrush:aTagBrush},smalltalk.TagBrush)})},
- args: ["aTagBrush"],
- source: "addBrush: aTagBrush\x0a\x09self appendChild: aTagBrush element.\x0a\x09^aTagBrush",
- messageSends: ["appendChild:", "element"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "align:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("align",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"align:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "align: aString\x0a\x09self at: 'align' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "alt:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("alt",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"alt:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "alt: aString\x0a\x09self at: 'alt' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "append:",
- category: 'adding',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(anObject)._appendToBrush_(self);
- return self}, function($ctx1) {$ctx1.fill(self,"append:",{anObject:anObject},smalltalk.TagBrush)})},
- args: ["anObject"],
- source: "append: anObject\x0a\x09anObject appendToBrush: self",
- messageSends: ["appendToBrush:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "appendBlock:",
- category: 'adding',
- fn: function (aBlock){
- var self=this;
- var root,fragment;
- function $DocumentFragmentTag(){return smalltalk.DocumentFragmentTag||(typeof DocumentFragmentTag=="undefined"?nil:DocumentFragmentTag)}
- return smalltalk.withContext(function($ctx1) {
- root=_st(self["@canvas"])._root();
- fragment=_st($DocumentFragmentTag())._canvas_(self["@canvas"]);
- _st(self["@canvas"])._root_(fragment);
- _st(aBlock)._value_(self["@canvas"]);
- self._appendDocumentFragment_(fragment);
- _st(self["@canvas"])._root_(root);
- return self}, function($ctx1) {$ctx1.fill(self,"appendBlock:",{aBlock:aBlock,root:root,fragment:fragment},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "appendBlock: aBlock\x0a\x09| root fragment |\x0a\x09root := canvas root.\x0a\x09fragment := DocumentFragmentTag canvas: canvas.\x0a\x09canvas root: fragment.\x0a\x09aBlock value: canvas.\x0a\x09self appendDocumentFragment: fragment.\x0a\x09canvas root: root",
- messageSends: ["root", "canvas:", "root:", "value:", "appendDocumentFragment:"],
- referencedClasses: ["DocumentFragmentTag"]
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "appendChild:",
- category: 'adding',
- fn: function (anElement){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var element=self['@element'];
- if (null == element.canHaveChildren || element.canHaveChildren) {
- element.appendChild(anElement);
- } else {
- element.text = String(element.text) + anElement.innerHTML;
- } ;
- return self}, function($ctx1) {$ctx1.fill(self,"appendChild:",{anElement:anElement},smalltalk.TagBrush)})},
- args: ["anElement"],
- 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} >",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "appendDocumentFragment:",
- category: 'private',
- fn: function (anElement){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var element=self['@element'].appendChild(anElement["@element"]);
- return self}, function($ctx1) {$ctx1.fill(self,"appendDocumentFragment:",{anElement:anElement},smalltalk.TagBrush)})},
- args: ["anElement"],
- source: "appendDocumentFragment: anElement\x0a\x09<var element=self['@element'].appendChild(anElement[\x22@element\x22])>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "appendString:",
- category: 'adding',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._appendChild_(self._createTextNodeFor_(aString));
- return self}, function($ctx1) {$ctx1.fill(self,"appendString:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "appendString: aString\x0a\x09self appendChild: (self createTextNodeFor: aString)",
- messageSends: ["appendChild:", "createTextNodeFor:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "appendToBrush:",
- category: 'adding',
- fn: function (aTagBrush){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(aTagBrush)._addBrush_(self);
- return self}, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},smalltalk.TagBrush)})},
- args: ["aTagBrush"],
- source: "appendToBrush: aTagBrush\x0a\x09aTagBrush addBrush: self",
- messageSends: ["addBrush:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "asJQuery",
- category: 'converting',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(self._element())._asJQuery();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"asJQuery",{},smalltalk.TagBrush)})},
- args: [],
- source: "asJQuery\x0a\x09^self element asJQuery",
- messageSends: ["asJQuery", "element"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "at:put:",
- category: 'attributes',
- fn: function (aString,aValue){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self['@element'].setAttribute(aString, aValue);
- return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{aString:aString,aValue:aValue},smalltalk.TagBrush)})},
- args: ["aString", "aValue"],
- source: "at: aString put: aValue\x0a\x09<self['@element'].setAttribute(aString, aValue)>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "class:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self['@element'].className = aString;
- return self}, function($ctx1) {$ctx1.fill(self,"class:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "class: aString\x0a\x09<self['@element'].className = aString>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "cols:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("cols",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"cols:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "cols: aString\x0a\x09self at: 'cols' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "contenteditable:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("contenteditable",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"contenteditable:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "contenteditable: aString\x0a\x09self at: 'contenteditable' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "contents:",
- category: 'adding',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1,$2;
- $1=self;
- _st($1)._empty();
- $2=_st($1)._append_(anObject);
- return self}, function($ctx1) {$ctx1.fill(self,"contents:",{anObject:anObject},smalltalk.TagBrush)})},
- args: ["anObject"],
- source: "contents: anObject\x0a\x09self\x0a\x09empty;\x0a\x09append: anObject",
- messageSends: ["empty", "append:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "contextmenu:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("contextmenu",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"contextmenu:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "contextmenu: aString\x0a\x09self at: 'contextmenu' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "createElementFor:",
- category: 'private',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- return document.createElement(String(aString));
- return self}, function($ctx1) {$ctx1.fill(self,"createElementFor:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "createElementFor: aString\x0a\x09<return document.createElement(String(aString))>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "createTextNodeFor:",
- category: 'private',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- return document.createTextNode(String(aString));
- return self}, function($ctx1) {$ctx1.fill(self,"createTextNodeFor:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "createTextNodeFor: aString\x0a\x09<return document.createTextNode(String(aString))>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "draggable:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("draggable",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"draggable:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "draggable: aString\x0a\x09self at: 'draggable' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "element",
- category: 'accessing',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=self["@element"];
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"element",{},smalltalk.TagBrush)})},
- args: [],
- source: "element\x0a\x09^element",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "empty",
- category: 'adding',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._empty();
- return self}, function($ctx1) {$ctx1.fill(self,"empty",{},smalltalk.TagBrush)})},
- args: [],
- source: "empty\x0a\x09self asJQuery empty",
- messageSends: ["empty", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "for:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("for",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"for:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "for: aString\x0a\x09self at: 'for' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "height:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("height",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"height:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "height: aString\x0a\x09self at: 'height' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "hidden",
- category: 'attributes',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("hidden","hidden");
- return self}, function($ctx1) {$ctx1.fill(self,"hidden",{},smalltalk.TagBrush)})},
- args: [],
- source: "hidden\x0a\x09self at: 'hidden' put: 'hidden'",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "href:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("href",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"href:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "href: aString\x0a\x09self at: 'href' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "id:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("id",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"id:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "id: aString\x0a\x09self at: 'id' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "initializeFromJQuery:canvas:",
- category: 'initialization',
- fn: function (aJQuery,aCanvas){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self["@element"]=_st(aJQuery)._get_((0));
- self["@canvas"]=aCanvas;
- return self}, function($ctx1) {$ctx1.fill(self,"initializeFromJQuery:canvas:",{aJQuery:aJQuery,aCanvas:aCanvas},smalltalk.TagBrush)})},
- args: ["aJQuery", "aCanvas"],
- source: "initializeFromJQuery: aJQuery canvas: aCanvas\x0a\x09element := aJQuery get: 0.\x0a\x09canvas := aCanvas",
- messageSends: ["get:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "initializeFromString:canvas:",
- category: 'initialization',
- fn: function (aString,aCanvas){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self["@element"]=self._createElementFor_(aString);
- self["@canvas"]=aCanvas;
- return self}, function($ctx1) {$ctx1.fill(self,"initializeFromString:canvas:",{aString:aString,aCanvas:aCanvas},smalltalk.TagBrush)})},
- args: ["aString", "aCanvas"],
- source: "initializeFromString: aString canvas: aCanvas\x0a\x09element := self createElementFor: aString.\x0a\x09canvas := aCanvas",
- messageSends: ["createElementFor:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "media:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("media",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"media:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "media: aString\x0a\x09self at: 'media' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "method:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("method",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"method:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "method: aString\x0a\x09self at: 'method' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "name:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("name",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "name: aString\x0a\x09self at: 'name' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onBlur:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("blur",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onBlur:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onBlur: aBlock\x0a\x09self asJQuery bind: 'blur' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onChange:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("change",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onChange:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onChange: aBlock\x0a\x09self asJQuery bind: 'change' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onClick:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("click",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onClick:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onClick: aBlock\x0a\x09self asJQuery bind: 'click' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onDblClick:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("dblclick",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onDblClick:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onDblClick: aBlock\x0a\x09self asJQuery bind: 'dblclick' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onFocus:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("focus",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onFocus:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onFocus: aBlock\x0a\x09self asJQuery bind: 'focus' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onFocusIn:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("focusin",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onFocusIn:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onFocusIn: aBlock\x0a\x09self asJQuery bind: 'focusin' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onFocusOut:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("focusout",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onFocusOut:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onFocusOut: aBlock\x0a\x09self asJQuery bind: 'focusout' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onHover:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("hover",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onHover:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onHover: aBlock\x0a\x09self asJQuery bind: 'hover' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onKeyDown:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("keydown",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onKeyDown: aBlock\x0a\x09self asJQuery bind: 'keydown' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onKeyPress:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("keypress",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onKeyPress:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onKeyPress: aBlock\x0a\x09self asJQuery bind: 'keypress' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onKeyUp:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("keyup",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onKeyUp:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onKeyUp: aBlock\x0a\x09self asJQuery bind: 'keyup' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onMouseDown:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("mousedown",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onMouseDown:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onMouseDown: aBlock\x0a\x09self asJQuery bind: 'mousedown' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onMouseEnter:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("mouseenter",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onMouseEnter:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onMouseEnter: aBlock\x0a\x09self asJQuery bind: 'mouseenter' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onMouseLeave:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("mouseleave",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onMouseLeave:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onMouseLeave: aBlock\x0a\x09self asJQuery bind: 'mouseleave' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onMouseMove:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("mousemove",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onMouseMove:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onMouseMove: aBlock\x0a\x09self asJQuery bind: 'mousemove' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onMouseOut:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("mouseout",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onMouseOut:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onMouseOut: aBlock\x0a\x09self asJQuery bind: 'mouseout' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onMouseOver:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("mouseover",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onMouseOver:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onMouseOver: aBlock\x0a\x09self asJQuery bind: 'mouseover' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onMouseUp:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("mouseup",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onMouseUp:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onMouseUp: aBlock\x0a\x09self asJQuery bind: 'mouseup' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onSelect:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("select",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onSelect:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onSelect: aBlock\x0a\x09self asJQuery bind: 'select' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onSubmit:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("submit",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onSubmit:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onSubmit: aBlock\x0a\x09self asJQuery bind: 'submit' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "onUnload:",
- category: 'events',
- fn: function (aBlock){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(self._asJQuery())._bind_do_("unload",aBlock);
- return self}, function($ctx1) {$ctx1.fill(self,"onUnload:",{aBlock:aBlock},smalltalk.TagBrush)})},
- args: ["aBlock"],
- source: "onUnload: aBlock\x0a\x09self asJQuery bind: 'unload' do: aBlock",
- messageSends: ["bind:do:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "placeholder:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("placeholder",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"placeholder:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "placeholder: aString\x0a\x09self at: 'placeholder' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "rel:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("rel",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"rel:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "rel: aString\x0a\x09self at: 'rel' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "removeAt:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self['@element'].removeAttribute(aString);
- return self}, function($ctx1) {$ctx1.fill(self,"removeAt:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "removeAt: aString\x0a\x09<self['@element'].removeAttribute(aString)>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "rows:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("rows",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"rows:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "rows: aString\x0a\x09self at: 'rows' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "src:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("src",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"src:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "src: aString\x0a\x09self at: 'src' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "style:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("style",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"style:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "style: aString\x0a\x09self at: 'style' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "tabindex:",
- category: 'attributes',
- fn: function (aNumber){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("tabindex",aNumber);
- return self}, function($ctx1) {$ctx1.fill(self,"tabindex:",{aNumber:aNumber},smalltalk.TagBrush)})},
- args: ["aNumber"],
- source: "tabindex: aNumber\x0a\x09self at: 'tabindex' put: aNumber",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "target:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("target",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"target:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "target: aString\x0a\x09self at: 'target' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "title:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("title",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"title:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "title: aString\x0a\x09self at: 'title' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "type:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("type",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"type:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "type: aString\x0a\x09self at: 'type' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "valign:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("valign",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"valign:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "valign: aString\x0a\x09self at: 'valign' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "value:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("value",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"value:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "value: aString\x0a\x09self at: 'value' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "width:",
- category: 'attributes',
- fn: function (aString){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._at_put_("width",aString);
- return self}, function($ctx1) {$ctx1.fill(self,"width:",{aString:aString},smalltalk.TagBrush)})},
- args: ["aString"],
- source: "width: aString\x0a\x09self at: 'width' put: aString",
- messageSends: ["at:put:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "with:",
- category: 'adding',
- fn: function (anObject){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._append_(anObject);
- return self}, function($ctx1) {$ctx1.fill(self,"with:",{anObject:anObject},smalltalk.TagBrush)})},
- args: ["anObject"],
- source: "with: anObject\x0a\x09self append: anObject",
- messageSends: ["append:"],
- referencedClasses: []
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "fromJQuery:canvas:",
- category: 'instance creation',
- fn: function (aJQuery,aCanvas){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $2,$3,$1;
- $2=self._new();
- _st($2)._initializeFromJQuery_canvas_(aJQuery,aCanvas);
- $3=_st($2)._yourself();
- $1=$3;
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"fromJQuery:canvas:",{aJQuery:aJQuery,aCanvas:aCanvas},smalltalk.TagBrush.klass)})},
- args: ["aJQuery", "aCanvas"],
- source: "fromJQuery: aJQuery canvas: aCanvas\x0a\x09^self new\x0a\x09\x09initializeFromJQuery: aJQuery canvas: aCanvas;\x0a\x09\x09yourself",
- messageSends: ["initializeFromJQuery:canvas:", "new", "yourself"],
- referencedClasses: []
- }),
- smalltalk.TagBrush.klass);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "fromString:canvas:",
- category: 'instance creation',
- fn: function (aString,aCanvas){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $2,$3,$1;
- $2=self._new();
- _st($2)._initializeFromString_canvas_(aString,aCanvas);
- $3=_st($2)._yourself();
- $1=$3;
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"fromString:canvas:",{aString:aString,aCanvas:aCanvas},smalltalk.TagBrush.klass)})},
- args: ["aString", "aCanvas"],
- source: "fromString: aString canvas: aCanvas\x0a\x09^self new\x0a\x09initializeFromString: aString canvas: aCanvas;\x0a\x09yourself",
- messageSends: ["initializeFromString:canvas:", "new", "yourself"],
- referencedClasses: []
- }),
- smalltalk.TagBrush.klass);
- smalltalk.addClass('DocumentFragmentTag', smalltalk.TagBrush, [], 'Canvas');
- smalltalk.addMethod(
- smalltalk.method({
- selector: "createDocumentFragment",
- category: 'private',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- return document.createDocumentFragment();
- return self}, function($ctx1) {$ctx1.fill(self,"createDocumentFragment",{},smalltalk.DocumentFragmentTag)})},
- args: [],
- source: "createDocumentFragment\x0a\x09<return document.createDocumentFragment()>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.DocumentFragmentTag);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "initializeFromCanvas:",
- category: 'initialization',
- fn: function (aCanvas){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self["@canvas"]=aCanvas;
- self["@element"]=self._createDocumentFragment();
- return self}, function($ctx1) {$ctx1.fill(self,"initializeFromCanvas:",{aCanvas:aCanvas},smalltalk.DocumentFragmentTag)})},
- args: ["aCanvas"],
- source: "initializeFromCanvas: aCanvas\x0a\x09canvas := aCanvas.\x0a\x09element := self createDocumentFragment",
- messageSends: ["createDocumentFragment"],
- referencedClasses: []
- }),
- smalltalk.DocumentFragmentTag);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "canvas:",
- category: 'instance creation',
- fn: function (aCanvas){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $2,$3,$1;
- $2=self._new();
- _st($2)._initializeFromCanvas_(aCanvas);
- $3=_st($2)._yourself();
- $1=$3;
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"canvas:",{aCanvas:aCanvas},smalltalk.DocumentFragmentTag.klass)})},
- args: ["aCanvas"],
- source: "canvas: aCanvas\x0a\x09^ self new\x0a\x09\x09initializeFromCanvas: aCanvas;\x0a\x09\x09yourself",
- messageSends: ["initializeFromCanvas:", "new", "yourself"],
- referencedClasses: []
- }),
- smalltalk.DocumentFragmentTag.klass);
- smalltalk.addClass('StyleTag', smalltalk.TagBrush, [], 'Canvas');
- 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.";
- smalltalk.addMethod(
- smalltalk.method({
- selector: "with:",
- category: 'adding',
- fn: function (aString){
- var self=this;
- function $HTMLCanvas(){return smalltalk.HTMLCanvas||(typeof HTMLCanvas=="undefined"?nil:HTMLCanvas)}
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st($HTMLCanvas())._isMSIE();
- if(smalltalk.assert($1)){
- _st(_st(self._element())._styleSheet())._cssText_(aString);
- } else {
- smalltalk.StyleTag.superclass.fn.prototype._with_.apply(_st(self), [aString]);
- };
- return self}, function($ctx1) {$ctx1.fill(self,"with:",{aString:aString},smalltalk.StyleTag)})},
- args: ["aString"],
- source: "with: aString\x0a\x09HTMLCanvas isMSIE\x0a\x09\x09ifTrue: [self element styleSheet cssText: aString ]\x0a\x09\x09ifFalse: [super with: aString ].",
- messageSends: ["ifTrue:ifFalse:", "isMSIE", "cssText:", "styleSheet", "element", "with:"],
- referencedClasses: ["HTMLCanvas"]
- }),
- smalltalk.StyleTag);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "canvas:",
- category: 'instance creation',
- fn: function (aCanvas){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- var $2,$3,$1;
- $2=self._new();
- _st($2)._initializeFromString_canvas_("style",aCanvas);
- $3=_st($2)._yourself();
- $1=$3;
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"canvas:",{aCanvas:aCanvas},smalltalk.StyleTag.klass)})},
- args: ["aCanvas"],
- source: "canvas: aCanvas\x0a\x09^self new\x0a\x09initializeFromString: 'style' canvas: aCanvas;\x0a\x09yourself",
- messageSends: ["initializeFromString:canvas:", "new", "yourself"],
- referencedClasses: []
- }),
- smalltalk.StyleTag.klass);
- smalltalk.addClass('Widget', smalltalk.InterfacingObject, [], 'Canvas');
- 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";
- smalltalk.addMethod(
- smalltalk.method({
- selector: "appendToBrush:",
- category: 'adding',
- fn: function (aTagBrush){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- self._appendToJQuery_(_st(aTagBrush)._asJQuery());
- return self}, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},smalltalk.Widget)})},
- args: ["aTagBrush"],
- source: "appendToBrush: aTagBrush\x0a\x09self appendToJQuery: aTagBrush asJQuery",
- messageSends: ["appendToJQuery:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.Widget);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "appendToJQuery:",
- category: 'adding',
- fn: function (aJQuery){
- var self=this;
- function $HTMLCanvas(){return smalltalk.HTMLCanvas||(typeof HTMLCanvas=="undefined"?nil:HTMLCanvas)}
- return smalltalk.withContext(function($ctx1) {
- self._renderOn_(_st($HTMLCanvas())._onJQuery_(aJQuery));
- return self}, function($ctx1) {$ctx1.fill(self,"appendToJQuery:",{aJQuery:aJQuery},smalltalk.Widget)})},
- args: ["aJQuery"],
- source: "appendToJQuery: aJQuery\x0a\x09self renderOn: (HTMLCanvas onJQuery: aJQuery)",
- messageSends: ["renderOn:", "onJQuery:"],
- referencedClasses: ["HTMLCanvas"]
- }),
- smalltalk.Widget);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "renderOn:",
- category: 'rendering',
- fn: function (html){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.Widget)})},
- args: ["html"],
- source: "renderOn: html\x0a\x09self",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Widget);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "heliosClass",
- category: 'helios',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- return "widget";
- }, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Widget.klass)})},
- args: [],
- source: "heliosClass\x0a\x09^ 'widget'",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Widget.klass);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "appendToBrush:",
- category: '*Canvas',
- fn: function (aTagBrush){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(aTagBrush)._append_(self._asString());
- return self}, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},smalltalk.Object)})},
- args: ["aTagBrush"],
- source: "appendToBrush: aTagBrush\x0a\x09aTagBrush append: self asString",
- messageSends: ["append:", "asString"],
- referencedClasses: []
- }),
- smalltalk.Object);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "appendToJQuery:",
- category: '*Canvas',
- fn: function (aJQuery){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(aJQuery)._append_(self._asString());
- return self}, function($ctx1) {$ctx1.fill(self,"appendToJQuery:",{aJQuery:aJQuery},smalltalk.Object)})},
- args: ["aJQuery"],
- source: "appendToJQuery: aJQuery\x0a\x09aJQuery append: self asString",
- messageSends: ["append:", "asString"],
- referencedClasses: []
- }),
- smalltalk.Object);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "appendToBrush:",
- category: '*Canvas',
- fn: function (aTagBrush){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(aTagBrush)._appendBlock_(self);
- return self}, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},smalltalk.BlockClosure)})},
- args: ["aTagBrush"],
- source: "appendToBrush: aTagBrush\x0a\x09aTagBrush appendBlock: self",
- messageSends: ["appendBlock:"],
- referencedClasses: []
- }),
- smalltalk.BlockClosure);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "appendToJQuery:",
- category: '*Canvas',
- fn: function (aJQuery){
- var self=this;
- function $HTMLCanvas(){return smalltalk.HTMLCanvas||(typeof HTMLCanvas=="undefined"?nil:HTMLCanvas)}
- return smalltalk.withContext(function($ctx1) {
- self._value_(_st($HTMLCanvas())._onJQuery_(aJQuery));
- return self}, function($ctx1) {$ctx1.fill(self,"appendToJQuery:",{aJQuery:aJQuery},smalltalk.BlockClosure)})},
- args: ["aJQuery"],
- source: "appendToJQuery: aJQuery\x0a\x09self value: (HTMLCanvas onJQuery: aJQuery)",
- messageSends: ["value:", "onJQuery:"],
- referencedClasses: ["HTMLCanvas"]
- }),
- smalltalk.BlockClosure);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "asSnippet",
- category: '*Canvas',
- fn: function (){
- var self=this;
- function $HTMLSnippet(){return smalltalk.HTMLSnippet||(typeof HTMLSnippet=="undefined"?nil:HTMLSnippet)}
- return smalltalk.withContext(function($ctx1) {
- var $1;
- $1=_st(_st($HTMLSnippet())._current())._snippetAt_(self._asString());
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"asSnippet",{},smalltalk.CharacterArray)})},
- args: [],
- source: "asSnippet\x0a\x09^ HTMLSnippet current snippetAt: self asString",
- messageSends: ["snippetAt:", "current", "asString"],
- referencedClasses: ["HTMLSnippet"]
- }),
- smalltalk.CharacterArray);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "appendToBrush:",
- category: '*Canvas',
- fn: function (aTagBrush){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(aTagBrush)._appendString_(self);
- return self}, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},smalltalk.String)})},
- args: ["aTagBrush"],
- source: "appendToBrush: aTagBrush\x0a\x09aTagBrush appendString: self",
- messageSends: ["appendString:"],
- referencedClasses: []
- }),
- smalltalk.String);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "appendToJQuery:",
- category: '*Canvas',
- fn: function (aJQuery){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- _st(aJQuery)._append_(self);
- return self}, function($ctx1) {$ctx1.fill(self,"appendToJQuery:",{aJQuery:aJQuery},smalltalk.String)})},
- args: ["aJQuery"],
- source: "appendToJQuery: aJQuery\x0a\x09aJQuery append: self",
- messageSends: ["append:"],
- referencedClasses: []
- }),
- smalltalk.String);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "asJQuery",
- category: '*Canvas',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- return jQuery(String(self));
- return self}, function($ctx1) {$ctx1.fill(self,"asJQuery",{},smalltalk.String)})},
- args: [],
- source: "asJQuery\x0a\x09<return jQuery(String(self))>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.String);
- smalltalk.addMethod(
- smalltalk.method({
- selector: "asJQuery",
- category: '*Canvas',
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
- return jQuery(self['@jsObject']);
- return self}, function($ctx1) {$ctx1.fill(self,"asJQuery",{},smalltalk.JSObjectProxy)})},
- args: [],
- source: "asJQuery\x0a\x09<return jQuery(self['@jsObject'])>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.JSObjectProxy);
- });
|