IE 8/ 9 doesn't support onload()/ onerror event. It is supported on IE 10.
Always perform browser check in the code. For example using onload function, always perform check like -
Always perform browser check in the code. For example using onload function, always perform check like -
var scriptlocale = document.createElement("script");
// block executed for IE8/ IE9
if(typeof (scriptlocale.onload) === "undefined"){
}
// executed in case of IE10 browser
else{
scriptlocale.src = "testScript.js"';
scriptlocale.onload = executeOnLoadCallBack;
scriptlocale.onerror = executeOnErrorCallBack;
}
No comments:
Post a Comment