A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.
To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).
Modifications: Difference between revisions
Jump to navigation
Jump to search
(missed some arguments) |
(more context) |
||
Line 1: | Line 1: | ||
This page documents options (and their pro/con situation) for a mutation event replacement model. | |||
Options: | |||
* '''Immediately:''' i.e. while the operation is underway. [Note: This is how current DOM Mutation events work]. | |||
* '''After modifications:''' Upon completion of the "outer-most" DOM operation. i.e. Immediately before a the lowest-on-the-stack DOM operation returns, but after it has done all of its work. | |||
* '''End of current task:''' i.e. immediately before the UA is about to fetch a new Task to run. | |||
* '''New task:''' i.e. fully async. | |||
{| class="wikitable" | {| class="wikitable" | ||
| | | |
Revision as of 15:51, 13 August 2011
This page documents options (and their pro/con situation) for a mutation event replacement model.
Options:
- Immediately: i.e. while the operation is underway. [Note: This is how current DOM Mutation events work].
- After modifications: Upon completion of the "outer-most" DOM operation. i.e. Immediately before a the lowest-on-the-stack DOM operation returns, but after it has done all of its work.
- End of current task: i.e. immediately before the UA is about to fetch a new Task to run.
- New task: i.e. fully async.
Immediately | After modifications | End of current task | New task | |
---|---|---|---|---|
Pro |
|
|
|
|
Con | Because mutations must be delivered for some DOM operations before the operation is complete, UAs must tolerate all ways in which script may invalidate their assumptions before they do further work. |
|
|
It's too late. Most use cases for mutation observation require that observers run before a paint occurs. E.g. a widget library which
watches for special attributes. Script may create a and an observer will react to this by decorating the div as a FooButton. It is unacceptable (creates visual artifacts/flickering) to have the div be painted before the widget library has decorated it as a FooButton.
Both of these options appear to be non-starters. Option 1 has been shown by experience to be an unreasonable implementation burden for UAs. Option 4 clearly doesn't handle properly important use cases. |