enyo / opentip

Opentip is an open source javascript tooltip based on the protoype framework.
http://www.opentip.org
1.25k stars 401 forks source link

IE8 Object doesn't support property or method 'addEventListener' #110

Open davidrac opened 10 years ago

davidrac commented 10 years ago

When using IE8, opentip-native-excanvas.js throws the above exception. The origin is line 1899. This is the code: Adapter.prototype.observe = function(element, eventName, observer) { return this.unwrap(element).addEventListener(eventName, observer, false); };

It should probably be changed to check if this is IE8 and if so, use attach event instead. I've seen other places in the code that do this.