How to register all modifications of dom subtree with google / firebug developer tools

I know how to “break” all subtree modifications using Google’s developer tools, but is there a way to register all calls in javascript that lead to the subtree modification of the html element? I need to do this because if I break subtree modifications, the website crashes and I cannot see the javascript call used.

+5
source share
1 answer

If you are only interested in registering when a node has been inserted or removed from the DOM, and which node it was and where it was inserted or deleted, you can do something like this:

(function(){

    function log( e ) {
        console.log( e );
    }
    document.body.addEventListener( "DOMNodeInserted", log );
    document.body.addEventListener( "DOMNodeRemoved", log );

})();

, , .

+5

All Articles