Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Commit

Permalink
GTNPORTAL-2908 Javascript bug on IE if there are portlet extra markup…
Browse files Browse the repository at this point in the history
… headers
  • Loading branch information
phuong_vu authored and trongtt committed Sep 27, 2013
1 parent 67e58e0 commit 100d657
Showing 1 changed file with 16 additions and 9 deletions.
Expand Up @@ -448,16 +448,23 @@
var script = markupHeadElements.scripts[i];

if (script.src) {
if (base.Browser.isIE()) {
script.onreadystatechange = function () {
if (/loaded|complete/.test(script.readyState)) {
script.onreadystatechange = null;
appendScript.apply(that);
}
};
if (script.onreadystatechange !== undefined) {
script.onreadystatechange = (function(sci) {
return function () {
if (!sci.readyState || /loaded|complete/.test(sci.readyState)) {
sci.onreadystatechange = null;
appendScript.apply(that);
}
};
})(script);
} else {
script.onload = script.onerror = function() {appendScript.apply(that);};
}
script.onload = (function(sci) {
return function() {sci.onload = null; appendScript.apply(that);};
})(script);
}
script.onerror = (function(sci) {
return function() {sci.onerror = null; appendScript.apply(that);};
})(script);
}
}
appendScript.apply(that);
Expand Down

0 comments on commit 100d657

Please sign in to comment.