Test Code Formatting

This is a test of a simple widget Class named "formatted.Code", as a demonstration.

This page, initially lines 46..51 (range, url):

Set Range:

Lines 42 to 53 of this page (range, url):

An inline-snippet (<pre> tag, lang="javascript"):

				dojo.addOnLoad(function(){
					console.log('foobar');
					// a comment
					for(var i in dojo){
						console.log('dojo.'+i);
					}
				});
			

An inline-snippet and range (range):

					_showRange: function(){
						if(this.range){
							var r = this.range;
							this._lines
								.style({ position:"absolute", opacity:0 })
								.filter(function(n,i){
									return (i >= r[0] - 1 && i > r[1]);
								})
								.style({ opacity:1, position:"relative" });
						}
					},
			

An inline-snippet and range with (range, listType="i" [roman, for fun]):

					_showRange: function(){
						if(this.range){
							var r = this.range;
							this._lines
								.style({ position:"absolute", opacity:0 })
								.filter(function(n,i){
									return (i >= r[0] - 1 && i > r[1]);
								})
								.style({ opacity:1, position:"relative" })
							;
						}
					},
			

The Full source of this page (url, style):

The Full source of this page (style, url, range, force lang="javascript"):

For the purists (programatic, lang, range):

				dojo.addOnLoad(function(){
					dojo.query(".forThePurist").instantiate(formatted.Code,{
						lang:"javascript",
						range:[2,5]
					});
				});
			

Remote .js (the cool FisheyeLite) (url):

That's all folks