smalltalk.addPackage('Canvas'); 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(""._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 := ('' 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:", "error:", "=", "size", "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.Object.fn.prototype._initialize.apply(_st(self), []); $1=self["@root"]; if(($receiver = $1) == nil || $receiver == undefined){ 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; var tag; function $TagBrush(){return smalltalk.TagBrush||(typeof TagBrush=="undefined"?nil:TagBrush)} return smalltalk.withContext(function($ctx1) { var $1; tag=_st($TagBrush())._fromString_canvas_(aString,self); _st(tag)._at_put_("amberContext","yepp"); _st(_st(tag)._element())._at_put_("amberContext",_st(_st(_st(_st(smalltalk.getThisContext()._outerContext())._outerContext())._outerContext())._methodContext())._method()); $1=tag; return $1; }, function($ctx1) {$ctx1.fill(self,"newTag:",{aString:aString,tag:tag},smalltalk.HTMLCanvas)})}, args: ["aString"], source: "newTag: aString\x0a\x09| tag |\x0a\x09tag := TagBrush fromString: aString canvas: self.\x0a\x09tag at: 'amberContext' put: 'yepp'.\x0a\x09tag element at: 'amberContext' put: thisContext outerContext outerContext outerContext methodContext method.\x0a\x09^ tag", messageSends: ["fromString:canvas:", "at:put:", "method", "methodContext", "outerContext", "element"], 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('HTMLCanvasInspector', smalltalk.Object, [], 'Canvas'); smalltalk.HTMLCanvasInspector.comment="I am used to inspect DOM elements built with Amber using the HTML canvas."; smalltalk.addMethod( smalltalk.method({ selector: "activate", category: 'as yet unclassified', fn: function (){ var self=this; return smalltalk.withContext(function($ctx1) { _st(self._amberDOMElements())._do_((function(each){ return smalltalk.withContext(function($ctx2) { return self._installCanvasInspectorOn_(each); }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})); return self}, function($ctx1) {$ctx1.fill(self,"activate",{},smalltalk.HTMLCanvasInspector)})}, args: [], source: "activate\x0a\x09\x22nasty nasty\x22\x0a\x09\x0a\x09self amberDOMElements do: [ :each |\x0a\x09\x09self installCanvasInspectorOn: each ]", messageSends: ["do:", "installCanvasInspectorOn:", "amberDOMElements"], referencedClasses: [] }), smalltalk.HTMLCanvasInspector); smalltalk.addMethod( smalltalk.method({ selector: "amberDOMElements", category: 'as yet unclassified', fn: function (){ var self=this; return smalltalk.withContext(function($ctx1) { var $1; $1=_st(_st(window)._jQuery_("[amberContext=yepp]"))._toArray(); return $1; }, function($ctx1) {$ctx1.fill(self,"amberDOMElements",{},smalltalk.HTMLCanvasInspector)})}, args: [], source: "amberDOMElements\x0a\x09^ (window jQuery: '[amberContext=yepp]') toArray", messageSends: ["toArray", "jQuery:"], referencedClasses: [] }), smalltalk.HTMLCanvasInspector); smalltalk.addMethod( smalltalk.method({ selector: "deactivate", category: 'as yet unclassified', fn: function (){ var self=this; return smalltalk.withContext(function($ctx1) { _st(self._amberDOMElements())._do_((function(each){ return smalltalk.withContext(function($ctx2) { return self._restore_(each); }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})); return self}, function($ctx1) {$ctx1.fill(self,"deactivate",{},smalltalk.HTMLCanvasInspector)})}, args: [], source: "deactivate\x0a\x09self amberDOMElements do: [ :each |\x0a\x09\x09self restore: each ]", messageSends: ["do:", "restore:", "amberDOMElements"], referencedClasses: [] }), smalltalk.HTMLCanvasInspector); smalltalk.addMethod( smalltalk.method({ selector: "inspect", category: 'as yet unclassified', fn: function (){ var self=this; return smalltalk.withContext(function($ctx1) { self._activate(); return self}, function($ctx1) {$ctx1.fill(self,"inspect",{},smalltalk.HTMLCanvasInspector)})}, args: [], source: "inspect\x0a\x09self activate", messageSends: ["activate"], referencedClasses: [] }), smalltalk.HTMLCanvasInspector); smalltalk.addMethod( smalltalk.method({ selector: "inspect:", category: 'as yet unclassified', fn: function (aDOMElement){ var self=this; var jquery,method; return smalltalk.withContext(function($ctx1) { self._deactivate(); method=_st(aDOMElement)._at_("amberContext"); _st(console)._log_(_st(_st(_st(_st(method)._methodClass())._name()).__comma(" >> #")).__comma(_st(method)._selector())); return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{aDOMElement:aDOMElement,jquery:jquery,method:method},smalltalk.HTMLCanvasInspector)})}, args: ["aDOMElement"], source: "inspect: aDOMElement\x0a\x09| jquery method |\x0a\x09\x0a\x09self deactivate.\x0a\x09\x0a\x09method := (aDOMElement at: 'amberContext').\x0a\x09console log: method methodClass name, ' >> #', method selector", messageSends: ["deactivate", "at:", "log:", ",", "selector", "name", "methodClass"], referencedClasses: [] }), smalltalk.HTMLCanvasInspector); smalltalk.addMethod( smalltalk.method({ selector: "installCanvasInspectorOn:", category: 'as yet unclassified', fn: function (aDOMElement){ var self=this; var jquery,method,originalMouseOver,originalClick; return smalltalk.withContext(function($ctx1) { var $1,$2; jquery=_st(jQuery)._value_(aDOMElement); originalMouseOver=_st(aDOMElement)._at_("mouseover"); originalClick=_st(aDOMElement)._at_("click"); _st(console)._log_(originalClick); _st(aDOMElement)._at_put_("amberOriginalOnMouseOver",originalMouseOver); _st(aDOMElement)._at_put_("amberOriginalOnClick",originalClick); $1=jquery; _st($1)._off_("click"); $2=_st($1)._off_("mouseover"); _st(jquery)._mouseover_((function(){ return smalltalk.withContext(function($ctx2) { method=_st(aDOMElement)._at_("amberContext"); method; return _st(console)._log_(_st(_st(_st(_st(method)._methodClass())._name()).__comma(" >> #")).__comma(_st(method)._selector())); }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})); _st(jquery)._click_((function(event){ return smalltalk.withContext(function($ctx2) { _st(event)._preventDefault(); self._inspect_(aDOMElement); return false; }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1)})})); return self}, function($ctx1) {$ctx1.fill(self,"installCanvasInspectorOn:",{aDOMElement:aDOMElement,jquery:jquery,method:method,originalMouseOver:originalMouseOver,originalClick:originalClick},smalltalk.HTMLCanvasInspector)})}, args: ["aDOMElement"], source: "installCanvasInspectorOn: aDOMElement\x0a\x09| jquery method originalMouseOver originalClick |\x0a\x09\x0a\x09jquery := jQuery value: aDOMElement.\x0a\x09originalMouseOver := aDOMElement at: 'mouseover'.\x0a\x09originalClick := aDOMElement at: 'click'.\x0a\x09\x0a\x09console log: originalClick.\x0a\x09\x0a\x09aDOMElement at: 'amberOriginalOnMouseOver' put: originalMouseOver.\x0a\x09aDOMElement at: 'amberOriginalOnClick' put: originalClick.\x0a\x09\x0a\x09jquery off: 'click'; off: 'mouseover'.\x0a\x09\x0a\x09jquery mouseover: [\x0a\x09\x09method := (aDOMElement at: 'amberContext').\x0a\x09\x09console log: method methodClass name, ' >> #', method selector ].\x0a\x09\x09\x0a\x09jquery click: [ :event |\x0a\x09\x09event preventDefault.\x0a\x09\x09self inspect: aDOMElement.\x0a\x09\x09false ]", messageSends: ["value:", "at:", "log:", "at:put:", "off:", "mouseover:", ",", "selector", "name", "methodClass", "click:", "preventDefault", "inspect:"], referencedClasses: [] }), smalltalk.HTMLCanvasInspector); smalltalk.addMethod( smalltalk.method({ selector: "restore:", category: 'as yet unclassified', fn: function (aDOMElement){ var self=this; var jquery; return smalltalk.withContext(function($ctx1) { var $1,$2; jquery=_st(jQuery)._value_(aDOMElement); $1=jquery; _st($1)._off_("click"); $2=_st($1)._off_("mouseover"); _st(jquery)._mouseover_(_st(aDOMElement)._at_("amberOriginalOnMouseOver")); _st(jquery)._click_(_st(aDOMElement)._at_("amberOriginalOnClick")); _st(console)._log_(_st(aDOMElement)._at_("amberOriginalOnClick")); return self}, function($ctx1) {$ctx1.fill(self,"restore:",{aDOMElement:aDOMElement,jquery:jquery},smalltalk.HTMLCanvasInspector)})}, args: ["aDOMElement"], source: "restore: aDOMElement\x0a\x09| jquery |\x0a\x09\x0a\x09jquery := jQuery value: aDOMElement.\x0a\x09jquery off: 'click'; off: 'mouseover'.\x0a\x09\x0a\x09jquery mouseover: (aDOMElement at: 'amberOriginalOnMouseOver').\x0a\x09jquery click: (aDOMElement at: 'amberOriginalOnClick').\x0a\x09\x0a\x09console log: (aDOMElement at: 'amberOriginalOnClick')", messageSends: ["value:", "off:", "mouseover:", "at:", "click:", "log:"], referencedClasses: [] }), smalltalk.HTMLCanvasInspector); 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`