3 ms·
What would you consider a better implementation?
by voltagex_ 8y ago
What would you consider a better implementation?
- kuschku 8y agoAndroids Toolkit is much more powerful because it allows custom layouting engines. If web components was just a port of the Android toolkit we'd have canvas with accessibility, CSS grid as library not in the browser, and usable recycler views.
- spankalee 8y agoCustom layout is a complete separate spec, and being intended in Chrome right now. Web Components don't have to solve every known problem, some things are also solvable on their own.
- kuschku 8y agoThe whole point is that you get many more features. On Android, every element just knows its children, attributes, can process events, and can draw itself to a canvas or describe itself to a screenreader. This means designing a new layout is just another element that then knows how to position its children. An element that can change opacity slowly of its elements, or filter the text, is also just another element. You can do everything with it and still be accessible. And I'm not sure if you've ever tried implementing a RecyclerView on the web? It's absolute horror. Either you have to entirely hijack scrolling and thereby kill flinging and smooth scroll of the browser, or you have to use a lot of JS to at least make it seem real.