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

Method _handleMutations

www/js/_hyperscript-max.js:3248–3259  ·  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

3246 * @param {MutationRecord[]} mutations
3247 */
3248 _handleMutations(mutations) {
3249 var hasQueries = this._querySubscriptions.size > 0;
3250 var queryTargets = hasQueries ? /* @__PURE__ */ new Set() : null;
3251 for (var i = 0; i < mutations.length; i++) {
3252 var mutation = mutations[i];
3253 if (mutation.type === "attributes") {
3254 this._scheduleAttributeEffects(mutation.target, mutation.attributeName);
3255 }
3256 if (queryTargets) queryTargets.add(mutation.target);
3257 }
3258 if (queryTargets) this._scheduleQueryEffects(queryTargets);
3259 }
3260 /**
3261 * Handle delegated input/change events. Dispatches to property and
3262 * query subscriptions.

Callers 1

_initGlobalObserverMethod · 0.45

Calls 2

_scheduleQueryEffectsMethod · 0.45

Tested by

no test coverage detected