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

Method maybeNotify

src/core/runtime/runtime.js:489–496  ·  view source on GitHub ↗

* Check if a method call is known to mutate its receiver, and notify if so. * @param {Object} target - The object the method was called on * @param {string} methodName - The method name

(target, methodName)

Source from the content-addressed store, hash-verified

487 * @param {string} methodName - The method name
488 */
489 maybeNotify(target, methodName) {
490 if (target == null || typeof target !== "object") return;
491 var typeName = target.constructor && target.constructor.name;
492 var methods = typeName && config.mutatingMethods[typeName];
493 if (methods && methods.includes(methodName)) {
494 this.notifyMutation(target);
495 }
496 }
497
498 #trackMutation(val) {
499 if (this.reactivity.isTracking && val != null && typeof val === "object") {

Callers 2

resolveMethod · 0.45
resolveMethod · 0.45

Calls 1

notifyMutationMethod · 0.95

Tested by

no test coverage detected