define("amber_core/Canvas", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_vm/globals", "amber_core/Kernel-Objects", "amber_core/Kernel-Infrastructure", "amber_core/Kernel-Methods", "amber_core/Kernel-Collections"], function(smalltalk,nil,_st, globals){ smalltalk.addPackage('Canvas'); smalltalk.packages["Canvas"].transport = {"type":"amd","amdNamespace":"amber_core"}; smalltalk.addClass('BrowserInterface', globals.Object, [], 'Canvas'); globals.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:", protocol: '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},globals.BrowserInterface)})}, args: ["anObject"], source: "ajax: anObject\x0a\x09^ jQuery ajax: anObject", messageSends: ["ajax:"], referencedClasses: [] }), globals.BrowserInterface); smalltalk.addMethod( smalltalk.method({ selector: "alert:", protocol: '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},globals.BrowserInterface)})}, args: ["aString"], source: "alert: aString\x0a\x09^ window alert: aString", messageSends: ["alert:"], referencedClasses: [] }), globals.BrowserInterface); smalltalk.addMethod( smalltalk.method({ selector: "confirm:", protocol: '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},globals.BrowserInterface)})}, args: ["aString"], source: "confirm: aString\x0a\x09^ window confirm: aString", messageSends: ["confirm:"], referencedClasses: [] }), globals.BrowserInterface); smalltalk.addMethod( smalltalk.method({ selector: "isAvailable", protocol: '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",{},globals.BrowserInterface)})}, args: [], source: "isAvailable\x0a", messageSends: [], referencedClasses: [] }), globals.BrowserInterface); smalltalk.addMethod( smalltalk.method({ selector: "prompt:", protocol: '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},globals.BrowserInterface)})}, args: ["aString"], source: "prompt: aString\x0a\x09^ window prompt: aString", messageSends: ["prompt:"], referencedClasses: [] }), globals.BrowserInterface); smalltalk.addClass('HTMLCanvas', globals.Object, ['root'], 'Canvas'); globals.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", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "a\x0a\x09^ self tag: 'a'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "abbr", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "abbr\x0a\x09^ self tag: 'abbr'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "address", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "address\x0a\x09^ self tag: 'address'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "area", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "area\x0a\x09^ self tag: 'area'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "article", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "article\x0a\x09^ self tag: 'article'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "aside", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "aside\x0a\x09^ self tag: 'aside'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "audio", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "audio\x0a\x09^ self tag: 'audio'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "base", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "base\x0a\x09^ self tag: 'base'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "blockquote", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "blockquote\x0a\x09^ self tag: 'blockquote'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "body", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "body\x0a\x09^ self tag: 'body'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "br", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "br\x0a\x09^ self tag: 'br'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "button", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "button\x0a\x09^ self tag: 'button'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "canvas", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "canvas\x0a\x09^ self tag: 'canvas'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "caption", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "caption\x0a\x09^ self tag: 'caption'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "cite", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "cite\x0a\x09^ self tag: 'cite'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "code", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "code\x0a\x09^ self tag: 'code'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "col", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "col\x0a\x09^ self tag: 'col'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "colgroup", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "colgroup\x0a\x09^ self tag: 'colgroup'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "command", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "command\x0a\x09^ self tag: 'command'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "datalist", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "datalist\x0a\x09^ self tag: 'datalist'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "dd", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "dd\x0a\x09^ self tag: 'dd'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "del", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "del\x0a\x09^ self tag: 'del'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "details", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "details\x0a\x09^ self tag: 'details'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "div", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "div\x0a\x09^ self tag: 'div'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "div:", protocol: '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},globals.HTMLCanvas)})}, args: ["aBlock"], source: "div: aBlock\x0a\x09^ self div with: aBlock", messageSends: ["with:", "div"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "dl", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "dl\x0a\x09^ self tag: 'dl'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "dt", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "dt\x0a\x09^ self tag: 'dt'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "em", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "em\x0a\x09^ self tag: 'em'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "embed", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "embed\x0a\x09^ self tag: 'embed'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "entity:", protocol: 'adding', fn: function (aString){ var self=this; var result; return smalltalk.withContext(function($ctx1) { var $2,$4,$3,$1,$5; $2=""._asJQuery(); $4="&".__comma(aString); $ctx1.sendIdx[","]=2; $3=_st($4).__comma(";"); $ctx1.sendIdx[","]=1; $1=_st($2)._html_($3); result=_st($1)._text(); $5=_st(_st(result)._size()).__eq((1)); if(! smalltalk.assert($5)){ self._error_("Not an HTML entity: ".__comma(aString)); }; self._with_(result); return self}, function($ctx1) {$ctx1.fill(self,"entity:",{aString:aString,result:result},globals.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 := ('' 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: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "fieldset", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "fieldset\x0a\x09^ self tag: 'fieldset'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "figcaption", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "figcaption\x0a\x09^ self tag: 'figcaption'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "figure", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "figure\x0a\x09^ self tag: 'figure'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "footer", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "footer\x0a\x09^ self tag: 'footer'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "form", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "form\x0a\x09^ self tag: 'form'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "h1", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "h1\x0a\x09^ self tag: 'h1'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "h1:", protocol: '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},globals.HTMLCanvas)})}, args: ["anObject"], source: "h1: anObject\x0a\x09^ self h1 with: anObject", messageSends: ["with:", "h1"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "h2", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "h2\x0a\x09^ self tag: 'h2'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "h2:", protocol: '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},globals.HTMLCanvas)})}, args: ["anObject"], source: "h2: anObject\x0a\x09^ self h2 with: anObject", messageSends: ["with:", "h2"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "h3", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "h3\x0a\x09^ self tag: 'h3'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "h3:", protocol: '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},globals.HTMLCanvas)})}, args: ["anObject"], source: "h3: anObject\x0a\x09^ self h3 with: anObject", messageSends: ["with:", "h3"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "h4", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "h4\x0a\x09^ self tag: 'h4'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "h4:", protocol: '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},globals.HTMLCanvas)})}, args: ["anObject"], source: "h4: anObject\x0a\x09^ self h4 with: anObject", messageSends: ["with:", "h4"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "h5", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "h5\x0a\x09^ self tag: 'h5'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "h5:", protocol: '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},globals.HTMLCanvas)})}, args: ["anObject"], source: "h5: anObject\x0a\x09^ self h5 with: anObject", messageSends: ["with:", "h5"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "h6", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "h6\x0a\x09^ self tag: 'h6'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "h6:", protocol: '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},globals.HTMLCanvas)})}, args: ["anObject"], source: "h6: anObject\x0a\x09^ self h6 with: anObject", messageSends: ["with:", "h6"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "head", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "head\x0a\x09^ self tag: 'head'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "header", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "header\x0a\x09^ self tag: 'header'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "hgroup", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "hgroup\x0a\x09^ self tag: 'hgroup'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "hr", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "hr\x0a\x09^ self tag: 'hr'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "html", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "html\x0a\x09^ self tag: 'html'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "iframe", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "iframe\x0a\x09^ self tag: 'iframe'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "iframe:", protocol: '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},globals.HTMLCanvas)})}, args: ["aString"], source: "iframe: aString\x0a\x09^ self iframe src: aString", messageSends: ["src:", "iframe"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "img", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "img\x0a\x09^ self tag: 'img'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "img:", protocol: '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},globals.HTMLCanvas)})}, args: ["aString"], source: "img: aString\x0a\x09^ self img src: aString", messageSends: ["src:", "img"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "initialize", protocol: 'initialization', fn: function (){ var self=this; function $TagBrush(){return globals.TagBrush||(typeof TagBrush=="undefined"?nil:TagBrush)} return smalltalk.withContext(function($ctx1) { var $1; globals.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",{},globals.HTMLCanvas)})}, args: [], source: "initialize\x0a\x09super initialize.\x0a\x09root ifNil: [ root := TagBrush fromString: 'div' canvas: self ]", messageSends: ["initialize", "ifNil:", "fromString:canvas:"], referencedClasses: ["TagBrush"] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "initializeFromJQuery:", protocol: 'initialization', fn: function (aJQuery){ var self=this; function $TagBrush(){return globals.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},globals.HTMLCanvas)})}, args: ["aJQuery"], source: "initializeFromJQuery: aJQuery\x0a\x09root := TagBrush fromJQuery: aJQuery canvas: self", messageSends: ["fromJQuery:canvas:"], referencedClasses: ["TagBrush"] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "input", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "input\x0a\x09^ self tag: 'input'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "label", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "label\x0a\x09^ self tag: 'label'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "legend", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "legend\x0a\x09^ self tag: 'legend'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "li", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "li\x0a\x09^ self tag: 'li'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "li:", protocol: '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},globals.HTMLCanvas)})}, args: ["anObject"], source: "li: anObject\x0a\x09^ self li with: anObject", messageSends: ["with:", "li"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "link", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "link\x0a\x09^ self tag: 'link'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "map", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "map\x0a\x09^ self tag: 'map'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "mark", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "mark\x0a\x09^ self tag: 'mark'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "menu", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "menu\x0a\x09^ self tag: 'menu'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "meta", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "meta\x0a\x09^ self tag: 'meta'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "nav", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "nav\x0a\x09^ self tag: 'nav'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "newTag:", protocol: 'tags', fn: function (aString){ var self=this; function $TagBrush(){return globals.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},globals.HTMLCanvas)})}, args: ["aString"], source: "newTag: aString\x0a\x09^ TagBrush fromString: aString canvas: self", messageSends: ["fromString:canvas:"], referencedClasses: ["TagBrush"] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "noscript", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "noscript\x0a\x09^ self tag: 'noscript'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "object", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "object\x0a\x09^ self tag: 'object'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "ol", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "ol\x0a\x09^ self tag: 'ol'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "ol:", protocol: '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},globals.HTMLCanvas)})}, args: ["anObject"], source: "ol: anObject\x0a\x09^ self ol with: anObject", messageSends: ["with:", "ol"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "optgroup", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "optgroup\x0a\x09^ self tag: 'optgroup'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "option", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "option\x0a\x09^ self tag: 'option'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "output", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "output\x0a\x09^ self tag: 'output'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "p", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "p\x0a\x09^ self tag: 'p'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "p:", protocol: '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},globals.HTMLCanvas)})}, args: ["anObject"], source: "p: anObject\x0a\x09^ self p with: anObject", messageSends: ["with:", "p"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "param", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "param\x0a\x09^ self tag: 'param'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "pre", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "pre\x0a\x09^ self tag: 'pre'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "progress", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "progress\x0a\x09^ self tag: 'progress'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "root", protocol: 'accessing', fn: function (){ var self=this; var $1; $1=self["@root"]; return $1; }, args: [], source: "root\x0a\x09^ root", messageSends: [], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "root:", protocol: 'accessing', fn: function (aTagBrush){ var self=this; self["@root"]=aTagBrush; return self}, args: ["aTagBrush"], source: "root: aTagBrush\x0a\x09root := aTagBrush", messageSends: [], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "script", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "script\x0a\x09^ self tag: 'script'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "section", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "section\x0a\x09^ self tag: 'section'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "select", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "select\x0a\x09^ self tag: 'select'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "small", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "small\x0a\x09^ self tag: 'small'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "snippet:", protocol: 'accessing', fn: function (anElement){ var self=this; var clone,caret; function $TagBrush(){return globals.TagBrush||(typeof TagBrush=="undefined"?nil:TagBrush)} return smalltalk.withContext(function($ctx1) { var $1,$2,$3; clone=_st(_st(anElement)._asJQuery())._clone(); $1=_st($TagBrush())._fromJQuery_canvas_(clone,self); $ctx1.sendIdx["fromJQuery:canvas:"]=1; self._with_($1); caret=_st(clone)._find_("[data-snippet=\x22*\x22]"); $2=_st(_st(caret)._toArray())._isEmpty(); if(smalltalk.assert($2)){ caret=clone; caret; }; $3=_st($TagBrush())._fromJQuery_canvas_(_st(caret)._removeAttr_("data-snippet"),self); return $3; }, function($ctx1) {$ctx1.fill(self,"snippet:",{anElement:anElement,clone:clone,caret:caret},globals.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"] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "source", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "source\x0a\x09^ self tag: 'source'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "span", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "span\x0a\x09^ self tag: 'span'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "span:", protocol: '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},globals.HTMLCanvas)})}, args: ["anObject"], source: "span: anObject\x0a\x09^ self span with: anObject", messageSends: ["with:", "span"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "strong", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "strong\x0a\x09^ self tag: 'strong'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "strong:", protocol: '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},globals.HTMLCanvas)})}, args: ["anObject"], source: "strong: anObject\x0a\x09^ self strong with: anObject", messageSends: ["with:", "strong"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "style", protocol: 'tags', fn: function (){ var self=this; return smalltalk.withContext(function($ctx1) { var $1; $1=self._tag_("style"); return $1; }, function($ctx1) {$ctx1.fill(self,"style",{},globals.HTMLCanvas)})}, args: [], source: "style\x0a\x09^ self tag: 'style'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "style:", protocol: '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},globals.HTMLCanvas)})}, args: ["aString"], source: "style: aString\x0a\x09^ self style with: aString; yourself", messageSends: ["with:", "style", "yourself"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "sub", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "sub\x0a\x09^ self tag: 'sub'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "summary", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "summary\x0a\x09^ self tag: 'summary'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "sup", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "sup\x0a\x09^ self tag: 'sup'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "table", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "table\x0a\x09^ self tag: 'table'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "tag:", protocol: '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},globals.HTMLCanvas)})}, args: ["aString"], source: "tag: aString\x0a\x09^ root addBrush: (self newTag: aString)", messageSends: ["addBrush:", "newTag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "tbody", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "tbody\x0a\x09^ self tag: 'tbody'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "td", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "td\x0a\x09^ self tag: 'td'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "textarea", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "textarea\x0a\x09^ self tag: 'textarea'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "tfoot", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "tfoot\x0a\x09^ self tag: 'tfoot'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "th", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "th\x0a\x09^ self tag: 'th'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "thead", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "thead\x0a\x09^ self tag: 'thead'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "time", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "time\x0a\x09^ self tag: 'time'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "title", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "title\x0a\x09^ self tag: 'title'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "tr", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "tr\x0a\x09^ self tag: 'tr'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "ul", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "ul\x0a\x09^ self tag: 'ul'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "ul:", protocol: '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},globals.HTMLCanvas)})}, args: ["anObject"], source: "ul: anObject\x0a\x09^ self ul with: anObject", messageSends: ["with:", "ul"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "video", protocol: '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",{},globals.HTMLCanvas)})}, args: [], source: "video\x0a\x09^ self tag: 'video'", messageSends: ["tag:"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "with:", protocol: '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},globals.HTMLCanvas)})}, args: ["anObject"], source: "with: anObject\x0a\x09^ self root with: anObject", messageSends: ["with:", "root"], referencedClasses: [] }), globals.HTMLCanvas); smalltalk.addMethod( smalltalk.method({ selector: "initialize", protocol: 'initialization', fn: function (){ var self=this; return smalltalk.withContext(function($ctx1) { _st(jQuery)._basicAt_put_("allowJavaScriptCalls",true); return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.HTMLCanvas.klass)})}, args: [], source: "initialize\x0a\x09\x22Allow JS method calls for the jQuery object.\x0a\x09See boot.js DNU handling.\x22\x0a\x09\x0a\x09jQuery basicAt: 'allowJavaScriptCalls' put: true", messageSends: ["basicAt:put:"], referencedClasses: [] }), globals.HTMLCanvas.klass); smalltalk.addMethod( smalltalk.method({ selector: "onJQuery:", protocol: '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},globals.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: [] }), globals.HTMLCanvas.klass); smalltalk.addClass('HTMLSnippet', globals.Object, ['snippets'], 'Canvas'); globals.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`
  • `\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`
  • A foo
  • `\x0a\x0aFor a self-careting tags (not very useful, but you do not need to fill class etc.\x0ayou can use\x0a\x0a`
    `\x0a\x0aand in code later do:\x0a\x0a`html bar with: [ xxx ]`\x0a\x0ato render\x0a\x0a`
    ...added by xxx...
    `"; smalltalk.addMethod( smalltalk.method({ selector: "initializeFromJQuery:", protocol: '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},globals.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: [] }), globals.HTMLSnippet); smalltalk.addMethod( smalltalk.method({ selector: "installSnippetFromJQuery:", protocol: '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},globals.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: [] }), globals.HTMLSnippet); smalltalk.addMethod( smalltalk.method({ selector: "snippetAt:", protocol: '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},globals.HTMLSnippet)})}, args: ["aString"], source: "snippetAt: aString\x0a\x09^ self snippets at: aString", messageSends: ["at:", "snippets"], referencedClasses: [] }), globals.HTMLSnippet); smalltalk.addMethod( smalltalk.method({ selector: "snippetAt:compile:", protocol: 'method generation', fn: function (aString,anElement){ var self=this; function $ClassBuilder(){return globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)} function $HTMLCanvas(){return globals.HTMLCanvas||(typeof HTMLCanvas=="undefined"?nil:HTMLCanvas)} return smalltalk.withContext(function($ctx1) { _st(_st($ClassBuilder())._new())._installMethod_forClass_protocol_(_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},globals.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\x09protocol: '**snippets'", messageSends: ["installMethod:forClass:protocol:", "new", "asCompiledMethod:", "currySelf", "snippet:"], referencedClasses: ["ClassBuilder", "HTMLCanvas"] }), globals.HTMLSnippet); smalltalk.addMethod( smalltalk.method({ selector: "snippetAt:install:", protocol: '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},globals.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: [] }), globals.HTMLSnippet); smalltalk.addMethod( smalltalk.method({ selector: "snippets", protocol: '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"]=globals.HashedCollection._from_([]); $1=self["@snippets"]; } else { $1=$2; }; return $1; }, function($ctx1) {$ctx1.fill(self,"snippets",{},globals.HTMLSnippet)})}, args: [], source: "snippets\x0a\x09^ snippets ifNil: [ snippets := #{} ]", messageSends: ["ifNil:"], referencedClasses: [] }), globals.HTMLSnippet); smalltalk.addMethod( smalltalk.method({ selector: "snippetsFromJQuery:", protocol: '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},globals.HTMLSnippet)})}, args: ["aJQuery"], source: "snippetsFromJQuery: aJQuery\x0a\x09^ (aJQuery find: '[data-snippet]') toArray", messageSends: ["toArray", "find:"], referencedClasses: [] }), globals.HTMLSnippet); globals.HTMLSnippet.klass.iVarNames = ['current']; smalltalk.addMethod( smalltalk.method({ selector: "current", protocol: 'instance creation', fn: function (){ var self=this; var $1; $1=self["@current"]; return $1; }, args: [], source: "current\x0a\x09^ current", messageSends: [], referencedClasses: [] }), globals.HTMLSnippet.klass); smalltalk.addMethod( smalltalk.method({ selector: "ensureCurrent", protocol: '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=globals.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",{},globals.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: [] }), globals.HTMLSnippet.klass); smalltalk.addMethod( smalltalk.method({ selector: "initialize", protocol: 'initialization', fn: function (){ var self=this; return smalltalk.withContext(function($ctx1) { var $1; globals.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",{},globals.HTMLSnippet.klass)})}, args: [], source: "initialize\x0a\x09super initialize.\x0a\x09self isDOMAvailable ifTrue: [\x0a\x09\x09self ensureCurrent ]", messageSends: ["initialize", "ifTrue:", "isDOMAvailable", "ensureCurrent"], referencedClasses: [] }), globals.HTMLSnippet.klass); smalltalk.addMethod( smalltalk.method({ selector: "isDOMAvailable", protocol: 'instance creation', fn: function (){ var self=this; return smalltalk.withContext(function($ctx1) { return typeof document !== 'undefined' ; return self}, function($ctx1) {$ctx1.fill(self,"isDOMAvailable",{},globals.HTMLSnippet.klass)})}, args: [], source: "isDOMAvailable\x0a\x09< return typeof document !== 'undefined' >", messageSends: [], referencedClasses: [] }), globals.HTMLSnippet.klass); smalltalk.addMethod( smalltalk.method({ selector: "new", protocol: 'instance creation', fn: function (){ var self=this; return smalltalk.withContext(function($ctx1) { self._shouldNotImplement(); return self}, function($ctx1) {$ctx1.fill(self,"new",{},globals.HTMLSnippet.klass)})}, args: [], source: "new\x0a\x09self shouldNotImplement", messageSends: ["shouldNotImplement"], referencedClasses: [] }), globals.HTMLSnippet.klass); smalltalk.addClass('TagBrush', globals.Object, ['canvas', 'element'], 'Canvas'); globals.TagBrush.comment="I am a brush for building a single DOM element (which I hold onto).\x0a\x0aAll tags but `