MCPcopy Create free account
hub / github.com/adobe/react-spectrum / observe

Function observe

perf/app/measure.ts:246–257  ·  view source on GitHub ↗
(records: MutationRecord[] = [])

Source from the content-addressed store, hash-verified

244}
245
246function 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
259new MutationObserver(observe).observe(document.documentElement, {
260 subtree: true,

Callers 1

measure.tsFile · 0.70

Calls 1

checkFunction · 0.85

Tested by

no test coverage detected