The old contents of thisEdit
This answer is now deprecated. See the answer by deprecatedapsillers.
See
Since this is for a Chrome extension, you might as well use the other answers based onstandard DOM event - MutationObserverDOMSubtreeModified. See the support for this event across browsers. It has been supported in Chrome since 1.0.
$("#someDiv").bind("DOMSubtreeModified", function() { alert("tree changed"); }); See a working example here.