2 ms·
Attributes are strings, but web components can have properties like any other object, and you can set properties on elements from JS and almost all template lib
by spankalee 6y ago
Attributes are strings, but web components can have properties like any other object, and you can set properties on elements from JS and almost all template libraries.
Properties can be complex objects, do not trigger attributeChangedCallback, and don't need to be serialized.
What are you using to build your web components if you think they can only take strings?