每隔一段时间,当我加载我的网站大约五分之一时,它无法加载网站,并在IE 9控制台中说:
SCRIPT5007: Unable to get value of the property 'normalize': object is null or undefined
require.js, line 929 character 25
SCRIPT5007: Unable to get value of the property 'normalize': object is null or undefined
require.js, line 929 character 25
SCRIPT5007: Unable to get value of the property 'extend': object is null or undefined
Module.js?ts=@@timestamp, line 52 character 3
SCRIPT5007: Unable to get value of the property 'normalize': object is null or undefined
require.js, line 929 character 25
SCRIPT5007: Unable to get value of the property 'View': object is null or undefined
View.js?ts=@@timestamp, line 8 character 3
SCRIPT5007: Unable to set value of the property 'Validation': object is null or undefined
backbone.validation.js?ts=@@timestamp, line 15 character 3
SCRIPT5007: Unable to get value of the property 'extend': object is null or undefined
Class.js?ts=@@timestamp, line 10 character 3
SCRIPT5007: Object expected
hbs.js?ts=@@timestamp, line 143 character 15
SCRIPT5007: Object expected
hbs.js?ts=@@timestamp, line 143 character 15
SCRIPT5007: Object expected
hbs.js?ts=@@timestamp, line 143 character 15
SCRIPT5022: Load timeout for modules: css!lib/foundation/style_unnormalized2,css!lib/icon-font/fontcustom_unnormalized3,css!lib/icon-font/icon-font_unnormalized4,hbs!modules/header/HeaderTemplate_unnormalized5,css!modules/header/HeaderStyle_unnormalized6,hbs!lib/components/avatar/AvatarTemplate_unnormalized7,css!lib/components/avatar/AvatarStyle_unnormalized8,hbs!modules/login/LoginTemplate_unnormalized9,css!modules/login/LoginStyle_unnormalized10,hbs!modules/header/HeaderTemplate,hbs!lib/components/avatar/AvatarTemplate,hbs!modules/login/LoginTemplate
http://requirejs.org/docs/errors.html#timeout
require.js, line 1758 character 9
令人困惑的是,它只会偶尔发生,这可能是我需要我的javascript文件的方式吗?
答案 0 :(得分:0)
这似乎与JQuery
中发生的类似问题有关这完全是关于DOM没有准备就绪,因为DOM没有完全加载,所以会发生这种错误,这也会解释你所提到的“随机”行为。
如果您还没有这样做,请尝试在页面末尾添加脚本或某种延迟加载:
顺便说一下,只有这方面的帖子似乎微软否认它并不认为它是一个错误:
https://connect.microsoft.com/IE/feedback/details/792880/document-readystat