Update snippet descriptions

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-10-22 20:24:04 +03:00
parent aedcded750
commit d35575373f
41 changed files with 148 additions and 88 deletions

View File

@ -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.