Re: [w3c/webcomponents] The is="" attribute is confusing? Maybe we should encourage only ES6 class-based extension. (#509)

Let me try asking a broader question.

Inheritance makes a lot of things possible on other platforms that will never be possible without the web without `is=` or a better alternative. The fact that subclassing a `UIImageView` on iOS, `ImageView` on Android, or any other UI object works is one of the reasons native apps are doing way better than the web on mobile because integrating compatible code from different sources is much easier. The ability to extend existing classes allows us to build upon existing tools in a way that makes them interchangeable anywhere its parent class is used, but that's not possible on the web yet. I think the web's future will be brighter with the semantics of a class hierarchy.

We already know that wrapping builtins doesn't always work. Mixins don't always work either and introduce complexity and compatibility issues. The semantics of builtin elements provide accessibility features that are either impossible or too difficult to implement from scratch. Knowing all of that, the best solution I can think of is builtin element subclasses.

The most compelling argument I've heard from the anti-`is` people is that the builtin elements were not designed to be subclassed. That's a fair point, but it sounds like a fixable problem to me and `is` has already proven to work pretty well so far with the v0 and v1 polyfills. I think the benefits of inheritance far outweigh the potential cost of fixing issues that might come up.

If subclassing builtin elements is not an option, how else is the web going to catch up with the other platforms?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/509#issuecomment-258997221

Received on Monday, 7 November 2016 23:29:17 UTC