MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / _getObjectState

Method _getObjectState

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

3073 * @returns {{ id: string, subscriptions: Map|null }}
3074 */
3075 _getObjectState(obj) {
3076 var state = this._objectState.get(obj);
3077 if (!state) {
3078 this._objectState.set(obj, state = {
3079 id: String(++this._nextId),
3080 subscriptions: null
3081 });
3082 }
3083 return state;
3084 }
3085 /**
3086 * Whether an effect is currently evaluating its expression().
3087 * When true, reads (symbol/property/attribute) are recorded as dependencies.

Callers 7

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

Calls 2

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected