Hi Justin,
It's a good question.
On Thu, Oct 18, 2012 at 4:40 PM, Justin Meltzer <
jus...@airtimehq.com> wrote:
> I'm trying to understand the purpose of the observeOwnChanges option.
> Looking at the Mutation Summary source, it seems that if observeOwnChanges
> is set to false, then anytime the Mutation Observer API executes the
> callback, it disconnects the observer after pulling the mutations, creates
> summaries from them, returns those summaries inside the passed callback, and
> then reconnects the observer. Why would it be necessary to do this? If
The question is: do you want to be told in *the next* callback about
changes you make in *this callback*? Most frequently the answer is
"no". If you made the changes, you're unlikely to want to hear about
them and that's why it defaults to |false|.
Note that this option has no effect on changes you make *outside* the
callback (for example inside a DOM event handler). Those changes will
always be included in the calculation.
> observeOwnChanges is set to false, then won't the mutation summary library
> fail to report any mutations that occurred on the page while it was creating
> the summaries?
No. Access to the DOM is single-threaded. It's not possible for other
code which mutates the DOM to run while the MutationSummary is doing
its computation for you.
>
> --
> You received this message because you are subscribed to the Google Groups
> "mutation-summary-discuss" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/mutation-summary-discuss/-/cFA5hJmHFaQJ.
> To post to this group, send email to
>
mutation-sum...@googlegroups.com.
> To unsubscribe from this group, send email to
>
mutation-summary-d...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/mutation-summary-discuss?hl=en.