How can I deal with the following error that I get when I use Dean Edwards IE7.js with IE6?

I am using Dean Edwards' IE7.js for IE6

<!--[if lt IE 7]> <script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js" type="text/javascript"></script> <![endif]--> 

and get a JavaScript error in IE 6 when reading a line:

 c.runtimeStyle[h]=c.parentElement.currentStyle[h] 

How can i solve this?

+1
source share
1 answer

I do not believe IE6 has a parentElement property. Perhaps you can work around this by including this code in the <!--[if lt ie7]> :

 Element.prototype.parentElement = Element.prototype.parentNode; 
0
source

Source: https://habr.com/ru/post/885691/


All Articles