Opened 9 years ago
Closed 9 years ago
#15442 closed defect (invalid)
require("dojo/dojo.js") on nodejs not working properly
Reported by: | Kitson Kelly | Owned by: | Rawld Gill |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Loader | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
It appears that dojo/dojo.js
does not recognise it is running under nodejs (v0.6.18) when you do a require("dojo/dojo.js");
with current trunk.
The following:
dojoConfig = { baseUrl: ".", packages: [{ name: "dojo", location: "lib/dojo" },{ name: "dijit", location: "lib/dijit" },{ name: "dojox", location: "lib/dojox" }] } require("./lib/dojo/dojo.js");
Will error out with:
lib/dojo/mouse.js:20 has.add("events-mousewheel", 'onmousewheel' in win.doc); ^ TypeError: Cannot use 'in' operator to search for 'onmousewheel' in null at String.IN (native) at lib/dojo/mouse.js:20:52 at lib/dojo/dojo.js:1049:43 at lib/dojo/dojo.js:1179:5 at lib/dojo/dojo.js:1170:12 at lib/dojo/dojo.js:1170:12 at lib/dojo/dojo.js:1170:12 at lib/dojo/dojo.js:751:6 at lib/dojo/dojo.js:124:11 at lib/dojo/dojo.js:1838:17
When you add async: true
to the dojoConfig
, dojo.js
loads fine.
Change History (2)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
No, because it isn't pushed to github yet, where I was taking my code from. I can see that this will fix the issue.
Note: See
TracTickets for help on using
tickets.
have you tried since r28700?