Re: [Proto-Scripty] Re: from 1.6.0.1 to 1.7.1: alternative to Event.cache and ._eventID?

2012-08-20 Thread Victor
> > I use this check in a jasmine spec to ensure a newly created element > has attached events. The element is supposed to have events attached > to keydown and blur How exactly events are attached? With element.observe() or element.on()? Directly to element or to one of its ancestors (with

Re: [Proto-Scripty] Re: from 1.6.0.1 to 1.7.1: alternative to Event.cache and ._eventID?

2012-08-16 Thread dipnlik
I use this check in a jasmine spec to ensure a newly created element has attached events. The element is supposed to have events attached to keydown and blur, and altough right now I'm not exactly testing that, at least I could test that the element had attached events. If there are better ways t

[Proto-Scripty] Re: from 1.6.0.1 to 1.7.1: alternative to Event.cache and ._eventID?

2012-08-16 Thread Victor
> > In prototype 1.6.0.1 I used to use Event.cache[formElement._eventID] to > check if an element has attached events. > Why do you need such check at all? If you need to remove all event observers from element - there is #stopObserving(), if you need to remove from element and its children -