Commit 304b9482 authored by Alexander.Trofimov's avatar Alexander.Trofimov

Delete onreadystatechange event on load scripts. In IE10, two times there was...

Delete onreadystatechange event on load scripts. In IE10, two times there was an event about loading a script.
Now use only onload event (not support IE8).
parent 5d770bbf
......@@ -2303,14 +2303,7 @@ CUserCacheColor.prototype.init = function(nColor) {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
script.onreadystatechange = function () {
if (this.readyState === 'complete' || this.readyState === 'loaded') {
script.onreadystatechange = null;
setTimeout(callback, 0);
}
};
script.onload = callback;
script.onload = scriptElem.onerror = callback;
// Fire the loading
document.head.appendChild(script);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment