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

Method _getObjectState

src/core/runtime/reactivity.js:198–207  ·  view source on GitHub ↗

* Get or create the reactive state object for any object. * Assigns a stable unique ID on first access. * @param {Object} obj - DOM element or plain JS object * @returns {{ id: string, subscriptions: Map|null }}

(obj)

Source from the content-addressed store, hash-verified

196 * @returns {{ id: string, subscriptions: Map|null }}
197 */
198 _getObjectState(obj) {
199 var state = this._objectState.get(obj);
200 if (!state) {
201 this._objectState.set(obj, state = {
202 id: String(++this._nextId),
203 subscriptions: null,
204 });
205 }
206 return state;
207 }
208
209 /**
210 * Whether an effect is currently evaluating its expression().

Callers 7

trackElementSymbolMethod · 0.95
trackPropertyMethod · 0.95
trackAttributeMethod · 0.95
trackQueryMethod · 0.95
notifyElementSymbolMethod · 0.95
_subscribeEffectMethod · 0.45
_unsubscribeEffectMethod · 0.45

Calls 2

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected