Skip to content

Commit

Permalink
fix ie bugs of can't find the js file
Browse files Browse the repository at this point in the history
  • Loading branch information
kolajs committed May 1, 2012
1 parent 3974aa4 commit 2beca23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1 +1 @@
kola��һ���������Webվ�㡢���ڰ���ϵ��JS�������
kola是一个面向大型Web站点、基于包体系的JS基础框架
7 changes: 6 additions & 1 deletion src/kola/Package.js
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,12 @@
// 设置加载错误后的处理方法
script.onerror = function() {
// throw new Error("JS文件加载失败:" + path);
alert("can't load js file:" + path);
var message = "can't load js file:" + path;
if (window.Error) {
throw new Error(message);
} else {
alert(message);
}
script.onerror = null;
};

Expand Down

0 comments on commit 2beca23

Please sign in to comment.