takeRecords method

JSArray<MutationRecord> takeRecords()

The MutationObserver method takeRecords() returns a list of all matching DOM changes that have been detected but not yet processed by the observer's callback function, leaving the mutation queue empty.

The most common use case for this is to immediately fetch all pending mutation records immediately prior to disconnecting the observer, so that any pending mutations can be processed when shutting down the observer.

Implementation

external JSArray<MutationRecord> takeRecords();