Skip to content Skip to sidebar Skip to footer

How To Check Event Listeners On An Element In Ie9

I have a page that has some td elements in a table that the user can click and drag to reorder. The page is built using prototype. In everything but IE9, this works, but in IE9,

Solution 1:

The latest PrototypeJS (1.7.1) stores the event observers in an Event Cache

So for example a <div> with id 'mydiv'

<div id="mydiv"></div>

After you create an observer via the observe() or on() methods like this

$('mydiv').observe('click',function(){
    alert('Click Happened');
});

The click property of the Event cache will be set like below

Event.cache[$('mydiv')._prototypeUID].click

However this might not be the source of your problem as you said it is working in all other browsers except IE9 - is there a way you can extract some of the code and put it into a JSFiddle and then post the link?

Post a Comment for "How To Check Event Listeners On An Element In Ie9"