define(
"dojo/parser", ["./_base/kernel", "./_base/lang", "./_base/array", "./_base/config", "./_base/html", "./_base/window", "./_base/url",
"./_base/json", "./aspect", "./date/stamp", "./has", "./query", "./on", "./ready"],
function(dojo, dlang, darray, config, dhtml, dwindow, _Url, djson, aspect, dates, has, query, don, ready){
// module:
// dojo/parser
// summary:
// The Dom/Widget parsing package
new Date("X"); // workaround for #11279, new Date("") == NaN
if (1) {
var form = document.createElement("form");
// Test if DOMNode.attributes only lists the attributes the user specified, not attributes w/default values.
has.add("dom-attributes-explicit", form.attributes.length == 0);
// IE8 will erroneously list a few attributes that weren't specified,
// but we know to skip them because they have a specified flag which is false
has.add("dom-attributes-specified-flag", form.attributes.length < 40);
// Otherwise, it's IE6-7 form.attributes will list hundreds of values, need to do outerHTML instead.
}
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 a map of { "list-of-mixins": ctor }
// if "list-of-mixins" is "__type" this is the raw type without mixins
var _ctorMap = {};
function getCtor(type){
var map = _ctorMap[type] || (_ctorMap[type] = {});
return map["__type"] || (map["__type"] = (dlang.getObject(type) || require(type)));
}
this._functionFromScript = function(script, attrData){
// summary:
// Convert a
// into a function
// script: DOMNode
// The