3 ms·
> Of course there's nothing standardised, and nothing interoperable. This is so very much not true. On what basis do you even claim this? Web components are J
by spankalee 3y ago
> Of course there's nothing standardised, and nothing interoperable.
This is so very much not true. On what basis do you even claim this?
Web components are JavaScript objects that extend from HTMLElement. They all share a common interface of attributes, children, events and properties.
You can get a reference to any web components any set a property on it:
document.querySelector('my-element').someProp = {};
This works on all web components. It's interoperable because there's no special React, or Angular, or Vue version of an API to set properties.
> There's literally no way to pass objects as attributes to web components
How do you even get a reference to an object in HTML to pass as an attribute, if you could?
And who cares? You can pass objects as properties to web components. Attributes are string-valued, why would you want to pass an object to them?
- troupo 3y ago> This is so very much not true. On what basis do you even claim this? I worte the basis, and you completely ignored it. > And who cares? Ah yes. The mantra of all web-component zealots. "Who cares". How it started [1]: "we have too much Javascript, we rely on too much Javascript for all our functionality, empty body tag is the bane of web sites" etc. How it's going: Who cares? Dozens of new JS APIs! More JS APIs coming every month. Why would you want to do anything with web components outside of Javascript? Declarative? Oh, in any of the Javascript libraries. Javascript Javascript Javascript Javascript Javascript. > Attributes are string-valued, why would you want to pass an object to them? That is not what anyone wrote. Literally not a single person. Anyway, this is hopeless. Web Component zealots are absolutely deaf and blind to anything outside of their world where goals shift faster than grains of sand in a hurricane. [1] The original pitch for Web Components: https://fronteers.nl/congres/2011/sessions/web-components-and-model-driven-views-alex-russell https://fronteers.nl/congres/2011/sessions/web-components-an...