(records: MutationRecord[] = [])
| 244 | } |
| 245 | |
| 246 | function observe(records: MutationRecord[] = []) { |
| 247 | if (sample && !sample.renderingOpportunity) { |
| 248 | sample.mutations += records.length; |
| 249 | for (let record of records) { |
| 250 | sample.nodesAdded += record.addedNodes.length; |
| 251 | sample.nodesRemoved += record.removedNodes.length; |
| 252 | } |
| 253 | } |
| 254 | if (!frameOnly) { |
| 255 | check(); |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | new MutationObserver(observe).observe(document.documentElement, { |
| 260 | subtree: true, |