IE 6 Does Not Support setAttribute()
As the title of this post suggests, IE 6 (and I’ll assume any version prior) has an incomplete or missing implementation of the setAttribute() method. If you attempt to use this method, the script will terminate and throw a nasty error that may potentially cause a client to think you’re an amateur.
There is a work around, but it’s about as ugly as it can get. Essentially you must use innerHTML to maually inject the code into a parent element. Fortunately, they somehow managed to get the createElement(), appendChild(), and removeChild() right.
Comments are closed. Sorry.