Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#16664 closed defect (fixed)

dojo/text! uses deprecated API, and not AMD-portable

Reported by: bill Owned by: bill
Priority: undecided Milestone: 1.9
Component: Core Version: 1.8.3
Keywords: Cc: Rawld Gill
Blocked By: Blocking:


dojo/text! should use dojo/request rather than dojo/_base/xhr. dojo/_base/xhr is deprecated, and dojo/request will work on node in addition to the browser.

Also, the code accesses require.cache, which does not exist on other AMD loaders, at least not on RequireJS.

Change History (4)

comment:1 Changed 9 years ago by bill

Cc: Rawld Gill added
Milestone: tbd1.9
Owner: set to bill
Status: newassigned

I'm not referring to the definition of dojo.cache(), which is going away in 2.0, but to the code that is staying.

I'm going to check in a fix. Rawld, please review.

comment:2 Changed 9 years ago by bill

Resolution: fixed
Status: assignedclosed

In [30524]:

For dojo/text, use dojo/request not deprecated dojo/_base/xhr, and don't assume require.cache is defined. Fixes #16664 !strict.

comment:3 Changed 9 years ago by bill

In [30537]:

On Node, dojo/text! wants to load from the local filesystem, not over HTTP, so dojo/request is not appropriate. Refs #16664 !strict.

comment:4 Changed 9 years ago by bill

In [30555]:

rhino fails just loading the dojo/request module, so need to has() bracket it, fixes regression from [30524], refs #16664, #16677 !strict.

Note: See TracTickets for help on using tickets.