MCPcopy Create free account
hub / github.com/EasyWebApp/WebCell / syncPropAttr

Method syncPropAttr

source/decorator.tsx:90–103  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

88 }
89
90 syncPropAttr(name: string) {
91 let value = this[toCamelCase(name)];
92
93 if (!(value != null) || value === false) return this.removeAttribute(name);
94
95 value = value === true ? name : value;
96
97 if (typeof value === 'object') {
98 value = value.toJSON?.();
99
100 value = typeof value === 'object' ? JSON.stringify(value) : value;
101 }
102 super.setAttribute(name, value);
103 }
104 }
105
106 return ObserverComponent as unknown as T;

Callers 1

#bootMethod · 0.95

Calls 1

setAttributeMethod · 0.80

Tested by

no test coverage detected