minor fixes

This commit is contained in:
Ilya Kantor 2020-09-13 23:56:48 +03:00
parent bd8e8a9bdd
commit c1e7bcb0df

View file

@ -243,14 +243,19 @@ When we stop the observing, it might be possible that some changes were not yet
These methods can be used together, like this:
```js
// we'd like to stop tracking changes
observer.disconnect();
// handle unprocessed some mutations
// get a list of unprocessed mutations
let mutationRecords = observer.takeRecords();
// stop tracking changes
observer.disconnect();
...
```
```smart header="Records returned by `observer.takeRecords()` are removed from the processing queue"
The callback won't be called for records, returned by `observer.takeRecords()`.
```
```smart header="Garbage collection interaction"
Observers use weak references to nodes internally. That is, if a node is removed from the DOM, and becomes unreachable, then it can be garbage collected.