Re: How to be notified when a node gets detached/reparented?

2012-10-12 Thread Paul Rouget
Jonas Sicking wrote: On Thu, Oct 11, 2012 at 6:04 AM, Paul Rouget p...@mozilla.com wrote: Paul Rouget wrote: Context: in the firefox devtools, we need to track some nodes and update different views based on what's happening to this node (show its parents, show its child, show its

Re: How to be notified when a node gets detached/reparented?

2012-10-12 Thread Paul Rouget
smaug wrote: On 10/11/2012 02:40 PM, Paul Rouget wrote: Context: in the firefox devtools, we need to track some nodes and update different views based on what's happening to this node (show its parents, show its child, show its attributes, …). The new Mutation observers are very helpful.

Re: How to be notified when a node gets detached/reparented?

2012-10-12 Thread Paul Rouget
Marcio Galli wrote: @Paul, What is your use case BTW? when you say update views based on mutations, is the goal is to let the user know what is going on? Or you actually performing other mutations back to the DOM or logging things or creating reports? For example: if you start the Firefox

How to be notified when a node gets detached/reparented?

2012-10-11 Thread Paul Rouget
Context: in the firefox devtools, we need to track some nodes and update different views based on what's happening to this node (show its parents, show its child, show its attributes, …). The new Mutation observers are very helpful. But there's one thing I am not really sure how to handle

Re: How to be notified when a node gets detached/reparented?

2012-10-11 Thread Paul Rouget
Marcio Galli wrote: Hi Paul, so this means we do not have anymore DOMnodeRemoved from the mutation events? There's no DOMNodeRemoved type: https://developer.mozilla.org/en-US/docs/DOM/MutationObserver#MutationObserverInit But there's a removedNodes from the mutation record. Maybe this array

Re: How to be notified when a node gets detached/reparented?

2012-10-11 Thread Paul Rouget
Paul Rouget wrote: Marcio Galli wrote: Hi Paul, so this means we do not have anymore DOMnodeRemoved from the mutation events? There's no DOMNodeRemoved type: https://developer.mozilla.org/en-US/docs/DOM/MutationObserver#MutationObserverInit But there's a removedNodes from the mutation

Re: How to be notified when a node gets detached/reparented?

2012-10-11 Thread Paul Rouget
Paul Rouget wrote: Context: in the firefox devtools, we need to track some nodes and update different views based on what's happening to this node (show its parents, show its child, show its attributes, …). The new Mutation observers are very helpful. But there's one thing I am not really

Re: How to be notified when a node gets detached/reparented?

2012-10-11 Thread Jonas Sicking
On Thu, Oct 11, 2012 at 6:04 AM, Paul Rouget p...@mozilla.com wrote: Paul Rouget wrote: Context: in the firefox devtools, we need to track some nodes and update different views based on what's happening to this node (show its parents, show its child, show its attributes, …). The new Mutation

Re: How to be notified when a node gets detached/reparented?

2012-10-11 Thread Marcio Galli
@Paul, What is your use case BTW? when you say update views based on mutations, is the goal is to let the user know what is going on? Or you actually performing other mutations back to the DOM or logging things or creating reports? m On Thu, Oct 11, 2012 at 4:27 PM, Jonas Sicking

Re: How to be notified when a node gets detached/reparented?

2012-10-11 Thread smaug
On 10/11/2012 02:40 PM, Paul Rouget wrote: Context: in the firefox devtools, we need to track some nodes and update different views based on what's happening to this node (show its parents, show its child, show its attributes, …). The new Mutation observers are very helpful. But there's one