Avoid confusing prototype methods for static methods
Correct: `Array.from()` (it’s a static method) Incorrect: `Array.join()` (doesn’t exist; it’s a prototype method) This patch uses the common `#` syntax to denote `.prototype.`.
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
Returns 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.forEach()` to run the callback for each mutation that is observed.
|
||||
Use `Array.prototype.forEach()` to run the callback for each mutation that is observed.
|
||||
Omit the third argument, `options`, to use the default [options](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver#MutationObserverInit) (all `true`).
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user