当前位置: 动力学知识库 > 问答 > 编程问答 >

Dojo DEPRECATED dojo.moduleUrl

问题描述:

Hellow I have one project and while running it I got some warnings:

DEPRECATED: dojo.moduleUrl() use require.toUrl -- will be removed in

version: 2.0

but where is no "moduleUrl" uses in my project, does anybody know how to fix it ? Thanx

网友答案:

You don't say what version of Dojo you are using, but I assume it is 1.9. According to a quick scan dojo.moduleUrl() is used in the dojox section about 40 times. dojo.moduleUrl itself is reporting that it is deprecated.

I would expect that when Dojo 2.0 comes out all the dojox widjets will be upgraded accordingly and your worries will be at an end.

Update: Just noticed a similar answer has been posted while I've been thinking of mine :-)

网友答案:

Some code in the dojox package still uses this function. Are you using anything from the dojox package?

If you want to find out what code is calling it, use the uncompressed dojo files and put a breakpoint in dojo/_base/kernal on ~line 282 (depending on version). When the breakpoint is hit, look at the call stack.

This message is only a warning and not an error, so your code isn't broken.

分享给朋友:
您可能感兴趣的文章:
随机阅读: