-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix dijit/_base API doc, in particular only show the symbols exported…
… by each module, even if the module (for back-compat reasons) is returning dijit itself. Refs #13101 !strict.
- Loading branch information
Showing
10 changed files
with
99 additions
and
106 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,35 @@ | ||
define([ | ||
"dojo/_base/array", | ||
"dojo/_base/config", // defaultDuration | ||
/*===== "dojo/_base/lang", =====*/ | ||
"dojo/_base/lang", | ||
"../registry", | ||
"../main" // for setting exports to dijit namespace | ||
], function(array, config, /*===== lang, =====*/ registry, dijit){ | ||
], function(array, config, lang, registry, dijit){ | ||
|
||
// module: | ||
// dijit/_base/manager | ||
// summary: | ||
// Shim to methods on registry, plus a few other declarations. | ||
// New code should access dijit/registry directly when possible. | ||
|
||
/*===== | ||
dijit.byId = function(id){ | ||
var exports = { | ||
// summary: | ||
// Returns a widget by it's id, or if passed a widget, no-op (like dom.byId()) | ||
// id: String|dijit._Widget | ||
return registry.byId(id); // dijit/_WidgetBase | ||
// Deprecated. Shim to methods on registry, plus a few other declarations. | ||
// New code should access dijit/registry directly when possible. | ||
}; | ||
|
||
dijit.getUniqueId = function(widgetType){ | ||
// summary: | ||
// Generates a unique id for a given widgetType | ||
// widgetType: String | ||
return registry.getUniqueId(widgetType); // String | ||
}; | ||
dijit.findWidgets = function(root){ | ||
// summary: | ||
// Search subtree under root returning widgets found. | ||
// Doesn't search for nested widgets (ie, widgets inside other widgets). | ||
// root: DOMNode | ||
return registry.findWidgets(root); | ||
}; | ||
dijit._destroyAll = function(){ | ||
// summary: | ||
// Code to destroy all widgets and do other cleanup on page unload | ||
return registry._destroyAll(); | ||
}; | ||
dijit.byNode = function(node){ | ||
// summary: | ||
// Returns the widget corresponding to the given DOMNode | ||
// node: DOMNode | ||
return registry.byNode(node); // dijit/_WidgetBase | ||
}; | ||
dijit.getEnclosingWidget = function(node){ | ||
// summary: | ||
// Returns the widget whose DOM tree contains the specified DOMNode, or null if | ||
// the node is not contained within the DOM tree of any widget | ||
// node: DOMNode | ||
return registry.getEnclosingWidget(node); | ||
}; | ||
=====*/ | ||
array.forEach(["byId", "getUniqueId", "findWidgets", "_destroyAll", "byNode", "getEnclosingWidget"], function(name){ | ||
dijit[name] = registry[name]; | ||
exports[name] = registry[name]; | ||
}); | ||
|
||
dijit.defaultDuration = config["defaultDuration"] || 200; | ||
/*===== | ||
lang.mixin(dijit, { | ||
lang.mixin(exports, { | ||
// defaultDuration: Integer | ||
// The default fx.animation speed (in ms) to use for all Dijit | ||
// transitional fx.animations, unless otherwise specified | ||
// on a per-instance basis. Defaults to 200, overrided by | ||
// `djConfig.defaultDuration` | ||
defaultDuration: 200 | ||
defaultDuration: config["defaultDuration"] || 200 | ||
}); | ||
=====*/ | ||
|
||
return dijit; | ||
lang.mixin(dijit, exports); | ||
|
||
/*===== return exports; =====*/ | ||
return dijit; // for back compat :-( | ||
}); |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
define([ "dojo/uacss" ], function(){ | ||
|
||
// module: | ||
// dijit/_base/sniff | ||
// summary: | ||
// Back compatibility module, new code should require dojo/uacss directly instead of this module. | ||
|
||
/*===== | ||
return { | ||
// summary: | ||
// Deprecated, back compatibility module, new code should require dojo/uacss directly instead of this module. | ||
}; | ||
=====*/ | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
define(["../typematic"], function(){ | ||
// for back-compat, just loads top level module | ||
|
||
/*===== | ||
return { | ||
// summary: | ||
// Deprecated, for back-compat, just loads top level module | ||
}; | ||
=====*/ | ||
|
||
}); |
This file contains 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
This file contains 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