Dojo require, connect to error when module failed loading

∥☆過路亽.° 提交于 2019-12-05 04:13:17

The documentation on this one is a bit curious. I can get the 'error' event to fire after a short timeout (dojoConfig.waitSeconds) after a failed xhr require, but only in async mode, and only with a dev build of Dojo.

Why? Well, only async mode raises the event, and it looks like the CDN build was built with dojo-timeout-api == 0.

Can you use your own custom (SDK) version of Dojo?

@mschr - your jsfiddle sample works if you use Dojo (nightly) instead of Dojo 1.7.2 - same reason as above.

try it with debugging set

<script src="{{baseUrl}}/dojo/dojo.js" data-dojo-config="async:true, debug: true, debugAtAllCost:true"></script>

Edit; no such luck - it seems that docs are ahead of implementation here..

created a fiddle for the purpose of maybe finding a solution, concept is nice, would enjoy to use this myself

http://jsfiddle.net/seeds/h6bXQ/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!