Why mutation observers are better than mutation events

In this example, we are creating 2500 paragraphs, and appending them to a document fragment. Then we'll append that document fragment to a div element. Rather than listen for mutation events, we'll use a mutation observer.

Our mutation observer callback function was invoked 0 time(s).