#13603 closed task (fixed)
dijit/registry, dijit/a11y, dijit/WidgetSet
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | Dijit | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Split off dijit registry, a11y related functions into separate AMD-friendly files:
- dijit/registry
- dijit/WidgetSet (deprecated class)
- dijit/a11y (tabindex related functions)
dijit/_base/manager.js remains for backwards compatibility.
Change History (14)
comment:1 follow-up: 4 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Summary: | dijit/registry → dijit/registry, dijit/a11y, dijit/WidgetSet |
comment:4 Changed 11 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Replying to bill:
(In [26071]) Make dijit.byId() etc. available in legacy (non AMD) mode even when dojo/_base/manager not explicitly loaded.
i'm having problems with this commit and since i don't fully understand all that its doing (or why its doing it the way it does) i'm not sure how to try and fix it.
the problem: the globals (dojo, dijit, dojox) can be remapped and the "naked" reference to the dojo
global fails.
so, a better test might be if (typeof dojo !== "undefined" && dojo.ready && !dojo.isAsync) { ... }
.
however, i'm not sure why you aren't just pulling in dojo/_base/kernel
and using it to check for !dojo.isAsync
in this case. that would also handle the case when the globals are remapped whereas the typeof
check wouldn't work as intended if the globals are remapped. of course, you'd also need to add dojo/ready
as a dependency to use it.
what am i missing that means this wouldn't work?
comment:5 Changed 11 years ago by
I could have pulled in dojo/_base/kernel, but I was just trying to minimize the amount of code, and I guess also I was trying to remove dojo/_base/kernel from the dependency lists of dijit modules, since dojo/_base/kernel in the dependency list usually indicates that a file wasn't fully converted to granular dependencies.
I didn't consider the remapping issue though. And I didn't consider that the condition:
if(dojo && ....)
will fail when dojo isn't defined because has("extend-dojo") is false.
So, feel free to update those modules (dijit, fx.js, dojo/dnd/Source.js, etc) to pull in and use dojo/_base/kernel (note that the dijit dependencies are in alphabetical order, and it always maps dojo/_base/kernel to the variable "kernel"), or alternately to change the if() condition as you listed above.
comment:6 Changed 11 years ago by
Rawld took the second approach for _WidgetBase.js in [26745], but the other files are still broken.
comment:7 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
i'm going to track this in #14033 - marked with high priority so it makes the 1.7 hot list.
comment:8 Changed 11 years ago by
btw - my preference will be pulling in dojo/_base/kernel rather than what was done in r26745.
(In [26050] Splits out tabindex related functions from dijit/_base/manager.js to separate dijit/a11y.js).
(In [26052]) Refactor dijit/_base/manager.js, putting common registry related methods into dijit/registry.js, and WidgetSet stuff in WidgetSet.js. WidgetSet is essentially deprecated, and dijit/_base/manager in general is unneeded; most widgets can just require dijit/registry to get the functions they need (byId(), byNode(), etc.) WidgetSet.js is still automatically loaded in legacy mode, when async:false, just in case some old app was depending on features like dijit.registry.forEach().
(In [26061]) dojo.registry.filter(...) ->dojo.forEach(dojo.registry.toArray(),...)
(In [26071]) Make dijit.byId() etc. available in legacy (non AMD) mode even when dojo/_base/manager not explicitly loaded.