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

Method notifyProperty

www/js/_hyperscript.js:3190–3201  ·  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

3188 * @param {Object} obj - DOM element or plain JS object
3189 */
3190 notifyProperty(obj) {
3191 if (obj == null || typeof obj !== "object" || obj._hsSkipTracking) return;
3192 var state = this._objectState.get(obj);
3193 if (state) {
3194 var subs = this._propertySubscriptions.get(state.id);
3195 if (subs) {
3196 for (var effect of subs) {
3197 this._scheduleEffect(effect);
3198 }
3199 }
3200 }
3201 }
3202 /**
3203 * Add an effect to the pending set.
3204 * 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