JavaScript · Senior · Question 40 of 75

What is MutationObserver useful for?

Explanation

For example, to react to markup inserted by a third-party widget or to implement autosave for contenteditable. Change records arrive in a batch as a microtask. For JS objects use Proxy; for localStorage, the storage event.

Further reading

Problem with a question

JavaScript · Senior · question 40

Test yourself

Take the JavaScript · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz