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

@WebReflection I wasn't trying to be patronising, it was more for posterity than your benefit. For the record and to be as clear as possible: I'm advocating for functions. Just functions. They take a single argument that is the class. No additional API additions to `customElements` or `customElements.define()`.

> I'm also concerned about possible polyfills, if we have unpolyfillable features, we need transpilers, and transpilers can have bugs that make the feature unusable (e.g. extending native classes)

Polyfills aren't immune to bugs. Case in point: one of the reasons we stopped using web components is that the polyfills were horribly unstable.

Maybe an alternative way to look at this would be to document the workarounds instead of forcing a solution down a particular path because it must be constrained to the ability to be polyfilled.

Some workarounds that we've used fitting the items I outlined earlier:

- Forms: https://skatejs.gitbooks.io/skatejs/content/docs/recipes/form-behaviour-and-the-shadow-dom.html
- Table rows, list items: you can use properties that take data structures instead of using form elements.

I think this would have a far more positive outcome because workarounds can be documented *now* and users can start consuming then *now*. Even if "is" was settled on, it would take time to finalise and ship. I'm optimistic as to where this discussion is headed, which I definitely couldn't say a few days ago. Props to @rniwa for being objective here.

-- 
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-281494624

Received on Tuesday, 21 February 2017 21:57:38 UTC