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

Method notifyProperty

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

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