So, just keep track of them with a typical variable?
var myElementIsObserved = false;
...
if(! myElementIsObserved)
{
Event.observe('myelement','focus',dosomething);
myElementIsObserved == true;
}
On Oct 4, 3:33 pm, kangax <[EMAIL PROTECTED]> wrote:
> On Oct 4, 5:20 pm, kstubs <[EMAIL PROTECTED]> wrote:
>
> > So how do you tell if you've already registered an event to be
>
> It's a good idea to keep track of them : )
> If you are working in an unknown environment and absolutely need to
> know if an element is "observed" by prototype:
>
> Element.addMethods({
> isObserved: function(element){
> return ('_prototypeEventID' in $(element));
> }
>
> });
> > observed? Also, what is the penalty for not issuing a stop observe?
>
> Usually, increased memory usage (and probably some run time processing
> overhead)
>
> --
> kangax
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---