MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / trackProperty

Method trackProperty

www/js/_hyperscript.js:3123–3129  ·  view source on GitHub ↗

* Track a property read as a dependency. * Subscription is coarse-grained (one handler per object, not per property), * so the dep key uses "*" rather than the property name. * @param {Object} obj - DOM element or plain JS object * @param {string} name - Property name

(obj, name)

Source from the content-addressed store, hash-verified

3121 * @param {string} name - Property name
3122 */
3123 trackProperty(obj, name) {
3124 if (obj == null || typeof obj !== "object" || obj._hsSkipTracking) return;
3125 this._currentEffect.dependencies.set(
3126 "property:" + this._getObjectState(obj).id,
3127 { type: "property", object: obj, name }
3128 );
3129 }
3130 /**
3131 * Track a DOM attribute read as a dependency.
3132 * @param {Element} element

Callers 2

resolvePropertyMethod · 0.45
#trackMutationMethod · 0.45

Calls 2

setMethod · 0.45
_getObjectStateMethod · 0.45

Tested by

no test coverage detected