From 1354d17270961fff662d40f90521223f8fd0d73b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 14 Aug 2012 18:59:10 +0400 Subject: update dojo to 1.7.3 --- lib/dojo/parser.js.uncompressed.js | 594 +++++++++++++++++++++++++++++++++++++ 1 file changed, 594 insertions(+) create mode 100644 lib/dojo/parser.js.uncompressed.js (limited to 'lib/dojo/parser.js.uncompressed.js') diff --git a/lib/dojo/parser.js.uncompressed.js b/lib/dojo/parser.js.uncompressed.js new file mode 100644 index 000000000..6d340fc24 --- /dev/null +++ b/lib/dojo/parser.js.uncompressed.js @@ -0,0 +1,594 @@ +define( + "dojo/parser", ["./_base/kernel", "./_base/lang", "./_base/array", "./_base/html", "./_base/window", "./_base/url", + "./_base/json", "./aspect", "./date/stamp", "./query", "./on", "./ready"], + function(dojo, dlang, darray, dhtml, dwindow, _Url, djson, aspect, dates, query, don){ + +// module: +// dojo/parser +// summary: +// The Dom/Widget parsing package + +new Date("X"); // workaround for #11279, new Date("") == NaN + +var features = { + // Feature detection for when node.attributes only lists the attributes specified in the markup + // rather than old IE/quirks behavior where it lists every default value too + "dom-attributes-explicit": document.createElement("div").attributes.length < 40 +}; +function has(feature){ + return features[feature]; +} + + +dojo.parser = new function(){ + // summary: + // The Dom/Widget parsing package + + var _nameMap = { + // Map from widget name (ex: "dijit.form.Button") to structure mapping + // lowercase version of attribute names to the version in the widget ex: + // { + // label: "label", + // onclick: "onClick" + // } + }; + function getNameMap(proto){ + // summary: + // Returns map from lowercase name to attribute name in class, ex: {onclick: "onClick"} + var map = {}; + for(var name in proto){ + if(name.charAt(0)=="_"){ continue; } // skip internal properties + map[name.toLowerCase()] = name; + } + return map; + } + // Widgets like BorderContainer add properties to _Widget via dojo.extend(). + // If BorderContainer is loaded after _Widget's parameter list has been cached, + // we need to refresh that parameter list (for _Widget and all widgets that extend _Widget). + aspect.after(dlang, "extend", function(){ + _nameMap = {}; + }, true); + + // Map from widget name (ex: "dijit.form.Button") to constructor + var _ctorMap = {}; + + this._functionFromScript = function(script, attrData){ + // summary: + // Convert a + // into a function + // script: DOMNode + // The