Prototype's Event system need to be fixed

5 views
Skip to first unread message

buda

unread,
Oct 24, 2011, 5:52:09 AM10/24/11
to Prototype & script.aculo.us
1)
Since IE9 IE has addEventListener - so it has to listen events in
standart W3C way -> so it has capture events
I use capturing very often - so I forced, instead using on or observe,
use addEventListener

2)
In the library's code there are planty tones of check - 'if
(element.addEventListener)'
I believe that they could be replaced by somthing like this:

if (element.addEventListener)
eventListenerFn = 'addEventListener'
else
eventListenerFn = 'attachEvent'

and than everywhere use - element[eventListenerFn] or somthing else

Victor

unread,
Oct 27, 2011, 4:47:50 PM10/27/11
to prototype-s...@googlegroups.com
I've seen on github that event system is reworked, but this is still work in progress. You can download bleeding-edge version and test for yourself.
Reply all
Reply to author
Forward
0 new messages