How to handle requireJs timeout error?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm writing a mobile hybrid app using require.js as my loading framework. I have an issue with loading errors. What I'm trying to do is setup a fallback solution when the device is offline and I can't download the google maps API script that I need to display a map on the screen. All that I get is Uncaught Error : Load timeout for modules : async ! http : //maps.googleapis.com/maps/api/js?sensor=true but I'm not able to catch this error and provide an alternative implementation. Here is my gmaps module definition define ( 'gmaps' ,