Update snippet descriptions
This commit is contained in:
@ -3,7 +3,7 @@ title: observeMutations
|
||||
tags: browser,event,advanced
|
||||
---
|
||||
|
||||
Returns a new `MutationObserver` and runs the provided callback for each mutation on the specified element.
|
||||
Creates a new `MutationObserver` and runs the provided callback for each mutation on the specified element.
|
||||
|
||||
- Use a [`MutationObserver`](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) to observe mutations on the given element.
|
||||
- Use `Array.prototype.forEach()` to run the callback for each mutation that is observed.
|
||||
|
||||
Reference in New Issue
Block a user