Re: Replacement for mutation events

Hi all,

I'm hoping we could prototype Jonas' proposal in Gecko
pretty soon (using moz prefix of course!). It should be very easy to
implement. The method names in the proposal could need still some tweaking.
Maybe there could be just two methods
addMutationObserver(SOME_CONSTANT, callback_function)
removeMutationObserver(SOME_CONSTANT, callback_function)


I'm worried about the performance of selector based
proposals.  You would need to run selector (after timeout)
whenever something in DOM tree changes, but also whenever some
state changes (hover, focus, etc). That would mean *lots* of
calls to querySelectorAll.
Also, the selector based proposals need a separate method for
changes in characterdata, like watchCharacterData.
That just feels a bit hacky to me.

-Olli



On 02/02/2011 10:29 AM, Jacob Rossi wrote:
> Hi folks,
>
> As we’ve discussed before, there’s a desire to move forward on spec’ing
> replacements for DOM mutation events. On the Web Apps wiki, there are
> two existing proposals (one from Microsoft, another from Mozilla) [1].
> Also, John Resig’s NodeList proposal has potential for solving some of
> the issues with the existing deprecated events [2].
>
> Since the current DOM mutation events are deprecated and there’s been a
> request from PFWG and others to see a replacement, I’d like to know what
> the plan is to move forward on this issue. Ideally, I think this will be
> work done in a separate spec and likely with separate conferences if needed.
>
> Thanks,
>
> Jacob
>
> [1] http://www.w3.org/2008/webapps/wiki/MutationReplacement
>
> [2] http://www.nodelist.org/
>

Received on Wednesday, 2 February 2011 11:01:57 UTC