News for hackers. Stuff that matters.
[dead]
Re:Shadow DOM enabled in Firefox nightly by cdaringe on Monday May 28, 2018 @12:21PM (#17173230)
Browsers aren't written in JavaScript. Your tone is unwelcome.
Re:Shadow DOM enabled in Firefox nightly by voltagex_ on Monday May 28, 2018 @12:12PM (#17173166)
What would you consider a better implementation?
Re:Shadow DOM enabled in Firefox nightly by kuschku on Monday May 28, 2018 @12:40PM (#17173342)
Androids 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.

Re:Shadow DOM enabled in Firefox nightly by spankalee on Monday May 28, 2018 @05:42PM (#17175027)
Custom 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.

Re:Shadow DOM enabled in Firefox nightly by kuschku on Tuesday May 29, 2018 @07:04AM (#17178010)
The 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.