MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / _handleMutations

Method _handleMutations

src/core/runtime/reactivity.js:373–384  ·  view source on GitHub ↗

* Handle MutationObserver callbacks. Dispatches to attribute and query * subscriptions based on mutation type. * @param {MutationRecord[]} mutations

(mutations)

Source from the content-addressed store, hash-verified

371 * @param {MutationRecord[]} mutations
372 */
373 _handleMutations(mutations) {
374 var hasQueries = this._querySubscriptions.size > 0;
375 var queryTargets = hasQueries ? new Set() : null;
376 for (var i = 0; i < mutations.length; i++) {
377 var mutation = mutations[i];
378 if (mutation.type === "attributes") {
379 this._scheduleAttributeEffects(mutation.target, mutation.attributeName);
380 }
381 if (queryTargets) queryTargets.add(mutation.target);
382 }
383 if (queryTargets) this._scheduleQueryEffects(queryTargets);
384 }
385
386 /**
387 * Handle delegated input/change events. Dispatches to property and

Callers 1

_initGlobalObserverMethod · 0.45

Calls 2

_scheduleQueryEffectsMethod · 0.95

Tested by

no test coverage detected