This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dojo.provide("dojo.NodeList-data"); | |
(function(d){ | |
/*===== | |
dojo.NodeList.prototype.data = function(key, value){ | |
// summary: stash or get some arbitrary data on/from these nodes. | |
// | |
// description: | |
// Stash or get some arbirtrary data on/from these nodes. This private _data function is | |
// exposed publicly on `dojo.NodeList`, eg: as the result of a `dojo.query` call. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> Testing dojo.xhr HEAD </title> | |
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js"></script> | |
<script> | |
dojo.ready(function(){ | |
var d = dojo, handlers = d.contentHandlers; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: dojo/parser.js | |
=================================================================== | |
--- dojo/parser.js (revision 22613) | |
+++ dojo/parser.js (working copy) | |
@@ -6,10 +6,40 @@ | |
dojo.parser = new function(){ | |
// summary: The Dom/Widget parsing package | |
- var d = dojo; | |
- this._attrName = d._scopeName + "Type"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Standalone Twitter widget</title> | |
</head> | |
<body> | |
<h1>A TwitterThingr</h1> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dojo.provide("dojox.mustache._Templated"); | |
dojo.require("dijit._Widget"); | |
dojo.require("dijit._Templated"); | |
// | |
// INSTALL: copy http://github.com/janl/mustache.js to this folder as _base.js | |
// Add dojox.mustache = dojo.hitch(Mustache, "to_html") in _base.js, wrapping | |
// the whole file in a self-executing-anonymous-function. eg: | |
// | |
// dojo.provide("dojox.mustache._base"); | |
// (function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js"></script> | |
<script> | |
dojo.declare("A", null, { | |
constructor:function(){}, | |
parented: function(){ | |
console.warn(arguments.length, arguments); // 3, [1,2,3] | |
return 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.format = function(opts){ | |
var o = $.extend({}, defaults.format, opts), codez = formatCodes(o.locale); | |
return this.each(function(){ | |
var me = $(this), isinput = me.is(":input"), | |
n = me[(isinput ? "val" : "text")] | |
; | |
n.call(me, formatNumber(n.call(me), o, codez)); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var wow = function(arg){ console.log(arg); }; | |
wow(bar); // bar defined later, but ready | |
wow(foo); // foo undefined just yet | |
var foo = function(){} | |
wow(foo); // foo now works |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dojo.extend(dijit._Widget, { | |
on: function(ev, cb, scp){ | |
if(scp){ cb = dojo.hitch(cb, scp) } | |
this.connect(this, ev, cb); | |
return this; // or return this.connect(...), can't decide | |
} | |
}); | |
// examples: | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Do Nothing.</title> | |
</head> | |
<body> | |
<script> | |
(function(){ | |
// some boilerplate load-a-script-code |