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

Method notifyProperty

www/js/_hyperscript.esm.js:3188–3199  ·  view source on GitHub ↗

* Notify that a property was written programmatically. * Schedules all effects watching properties on this object. * @param {Object} obj - DOM element or plain JS object

(obj)

Source from the content-addressed store, hash-verified

3186 * @param {Object} obj - DOM element or plain JS object
3187 */
3188 notifyProperty(obj) {
3189 if (obj == null || typeof obj !== "object" || obj._hsSkipTracking) return;
3190 var state = this._objectState.get(obj);
3191 if (state) {
3192 var subs = this._propertySubscriptions.get(state.id);
3193 if (subs) {
3194 for (var effect of subs) {
3195 this._scheduleEffect(effect);
3196 }
3197 }
3198 }
3199 }
3200 /**
3201 * Add an effect to the pending set.
3202 * Schedules a microtask to run them if one isn't already scheduled.

Callers 2

setPropertyMethod · 0.45
notifyMutationMethod · 0.45

Calls 2

getMethod · 0.45
_scheduleEffectMethod · 0.45

Tested by

no test coverage detected