[development] Fwd: Re: behaviors context
drupal at dave-cohen.com
Fri May 29 19:52:56 UTC 2009
I think I get what you're writing about. It makes sense when you're
behavior affects, say, all elements of a certain class. And you can
update the class after the behavior acts.
But in my case, I need to operate over all elements. So to do what
you're talking about I'd need to add classes all over the place.
Specifically, I'm working with Facebook Connect. And I need to tell
methods to do this,
One method parses the whole dom tree, another limits the parse to
specific elements. For performance reasons I prefer to use the more
limited method, but I'll resort to the other if I really have to.
On Fri, 29 May 2009 14:34 -0500, "Matt" <matt at aleph-null.tv> wrote:
> There are two patterns in Drupal JS to "prevent" the same behavior
> from processing the same data twice. One is the :not(processed-X)
> pattern, which seems to be pretty reliable, and is pretty much
> entirely in the hands of the author of the behavior (barring a
> misanthrope who decides to remove your processed classes).
More information about the development