Opened 11 years ago

Closed 11 years ago

#14043 closed defect (fixed)

[backcompat] dijit.registry.forEach reference fails

Reported by: Adam Peller Owned by: bill
Priority: high Milestone: 1.7
Component: Dijit Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:


Without explicitly referencing the new dijit.registry module, old code like dijit.registry.forEach(...) fails. Apparently, it's picking up the new dijit/registry.js reference implicitly through other modules?

Attachments (1)

layer.html (449 bytes) - added by bill 11 years ago.
working for me

Download all attachments as: .zip

Change History (5)

comment:1 Changed 11 years ago by Douglas Hays

Owner: set to bill

Changed 11 years ago by bill

Attachment: layer.html added

working for me

comment:2 Changed 11 years ago by bill

In [26781]:

Include WidgetSet from dijit/_base.js layer module, since it used to be part of base. Refs #13603, #14043 !strict.

comment:3 Changed 11 years ago by bill

Talked to Adam. The issue was related to referencing dijit.registry.forEach before the document had finished loading. Since WidgetSet.js was getting pulled in via this code in _Widget.js:

// For back-compat, remove in 2.0.
	ready(0, function(){
		var requires = ["dijit/_base/focus", "dijit/_base/place", "dijit/_base/popup", "dijit/_base/scroll",
			"dijit/_base/typematic", "dijit/_base/wai", "dijit/_base/window", "dijit/WidgetSet"];
		require(requires);	// use indirection so modules not rolled into a build

... dijit.registry.forEach wasn't available until after document load.

Anyway, the [26781] checkin above fixes that.

Last edited 11 years ago by bill (previous) (diff)

comment:4 Changed 11 years ago by bill

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.