MCPcopy Index your code
hub / github.com/EasyWebApp/WebCell / setAttribute

Method setAttribute

source/decorator.tsx:75–82  ·  view source on GitHub ↗
(name: string, value: string)

Source from the content-addressed store, hash-verified

73 }
74
75 setAttribute(name: string, value: string) {
76 const old = super.getAttribute(name),
77 names: string[] = this.constructor['observedAttributes'];
78
79 super.setAttribute(name, value);
80
81 if (names.includes(name)) this.attributeChangedCallback(name, old, value);
82 }
83
84 attributeChangedCallback(name: string, old: string, value: string) {
85 this[toCamelCase(name)] = parseJSON(value);

Callers 3

syncPropAttrMethod · 0.80
defaultValueMethod · 0.80
WebCell.spec.tsxFile · 0.80

Calls 1

Tested by

no test coverage detected