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

Method _getObjectState

tools/common/_hyperscript.iife.js:3021–3032  ·  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, propertyHandler: Object|null }}

(obj)

Source from the content-addressed store, hash-verified

3019 * @returns {{ id: string, subscriptions: Map|null, propertyHandler: Object|null }}
3020 */
3021 _getObjectState(obj) {
3022 var state = this._objectState.get(obj);
3023 if (!state) {
3024 this._objectState.set(obj, state = {
3025 id: String(++this._nextId),
3026 subscriptions: null,
3027 propertyHandler: null,
3028 attributeObservers: null
3029 });
3030 }
3031 return state;
3032 }
3033 /**
3034 * Whether an effect is currently evaluating its expression().
3035 * When true, reads (symbol/property/attribute) are recorded as dependencies.

Callers 9

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

Calls 2

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected