Huh, I was expecting MutationObserver[1] (which is the 'proper' way to do this, by the way). Not sure about the performance though - MutationObserver probably comes with more overhead.
[1]: https://developer.mozilla.org/en/docs/Web/API/MutationObserv...