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

Method notifyElementSymbol

www/js/_hyperscript.esm.js:3171–3182  ·  view source on GitHub ↗

* Notify that an element-scoped variable was written. * @param {string} name - Variable name * @param {Element} element - Owning element

(name, element)

Source from the content-addressed store, hash-verified

3169 * @param {Element} element - Owning element
3170 */
3171 notifyElementSymbol(name, element) {
3172 if (!element) return;
3173 var state = this._getObjectState(element);
3174 if (state.subscriptions) {
3175 var subs = state.subscriptions.get(name);
3176 if (subs) {
3177 for (var effect of subs) {
3178 this._scheduleEffect(effect);
3179 }
3180 }
3181 }
3182 }
3183 /**
3184 * Notify that a property was written programmatically.
3185 * Schedules all effects watching properties on this object.

Callers 1

setSymbolMethod · 0.45

Calls 3

_getObjectStateMethod · 0.45
getMethod · 0.45
_scheduleEffectMethod · 0.45

Tested by

no test coverage detected