Why Element.Storage?

8 views
Skip to first unread message

Eric J. Van der Velden

unread,
Aug 27, 2011, 4:33:28 AM8/27/11
to Prototype & script.aculo.us
Hello,

The function Element.observe first lets _createResponder create a
responder. Then it calls
element.addEventListener(actualEventName,responder,false)

This seems enough. Why stores _createResponder the responder in
Element.Storage (behind a index connected with element)?

Victor

unread,
Aug 29, 2011, 2:09:48 AM8/29/11
to prototype-s...@googlegroups.com
Hi!

If you like to browse source code, then you can answer by yourself. Just search for prototype_event_registry in sources.

Eric J. Van der Velden

unread,
Aug 29, 2011, 5:11:26 AM8/29/11
to Prototype & script.aculo.us
Hello Victor,

I already did. But I don't know the answer.

Thanks,

Eric J.

Victor

unread,
Aug 30, 2011, 10:15:40 AM8/30/11
to prototype-s...@googlegroups.com
OK, it is used in stopObserving to clean observers, mainly for IE (look at function _destroyCache) to prevent memory leaks.
Reply all
Reply to author
Forward
0 new messages