5 ms·
How do web components[1] fail to be the custom elements you imagined? [1] https://developer.mozilla.org/en-US/docs/Web/Web_Components https://developer.mozilla
by an1sotropy 5y ago
How do web components[1] fail to be the custom elements you imagined?
[1] https://developer.mozilla.org/en-US/docs/Web/Web_Components https://developer.mozilla.org/en-US/docs/Web/Web_Components
- Vinnl 5y agoIt is what Web Components were supposed to be, but they're not living up to that yet. They're reliant on client-side JavaScript, have special needs that cause them not to be well-integrated in the most widely-used JS framework yet, and have a number of other issues - as evidenced by the fact that there's still not a custom element that basically solves the mentioned limitations of Data Lists and is widely used and can be counted on to be as well-done as native elements in areas like accessibility. I partially blame those who were trying to repurpose them as an application architecture framework, but primarily it's just a hard problem to solve. Which is fine, but it's a shame that at the same time there's been practically no progress on the actually built-in elements, especially when you compare it to e.g. the amount of progress that's been made in JavaScript.
- an1sotropy 5y agoI'm probably ignorant: is there an example of any kind of custom element, in 2012 or now, with customization (nevermind CSS styling) that does not depend on JavaScript?
- Vinnl 5y agoNo, that's one of their limitations. (Well, styling can be done to some extent with CSS variables and the shadow DOM, I think.)
- an1sotropy 5y agoOk, so as someone new-ish to web programming, how should I understand the current relevance of 2012's Extensible Web Manifesto, and the dissatisfaction you're expressing about <datalist> and about Web Components? I'm sure it's due to a failure of imagination, maybe my own or maybe more widespread, but I don't actually know what you'd rather have, since it seems that there is still no concrete (even experimental) prototypes for kind of custom elements that you're envisioning. What am I missing?
- Vinnl 5y agoSo I'd prefer either: - built-in elements that cover common elements like autocompletes or typeahead elements that allow e.g. the inclusion of images and formatting with their suggestions, or - custom elements to work well enough in practice that those elements would have been created by third parties and would be widely used now. I don't know whether the latter is actually possible, but I'm lamenting the fact that a focus on that goal seems to have coincided with hardly any attention being given to the former.