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

@oleersoy 

> So I load this app in a browser that does not support custom elements or will not upgrade them for some reason. The FancyButton falls back to a normal not so fancy button, and when clicked nothing works.

Your example, and use case that ignores all other already discussed in here, relies heavily on JS regardless the usage of the `is` attribute.

So, if your question is if you should use a polyfill or not, that covers also the `is` attribute like [dre](https://github.com/WebReflection/document-register-element) does, then you are the only one that can answer such question: are your target browsers already spec-compliants? Then don't, otherwise go agead and juse a poly based on features detection 'till that day.


> I have not seen a single example that makes sense in an application context. 

This is a good old example from V0 era that shows just one of the huge amount of benefits of the `is` attribute. It's a [cros map](http://webreflection.github.io/document-register-element/test/examples/x-map.html) and it works down to IE8 and Android 2 or iOS 5 (and BB7, webOS, etc)

Somebody took that example saying "you could've just used a wrapper element" but that would be meaningless and redundant on the layout, and it might cause gotchas on IE8 side which is incompatible with randomly named elements (and CSS).

The curent polyfill now fallbacks to V0 but it brings in V1 as much as it can (there are parts of V1 that cannot be polyfilled these days) and your specific use case would be covered too.

Somebody went further away with the `map` element using layers and much more, still Custom Elements only: https://customelements.io/Maps4HTML/Web-Map-Custom-Element/

Last, but not least, I've used Custom Elements for years now and never together with ShadowDOM due greediness of the old polyfill with WeakMaps that were breaking all over.
That doesn't meen ShadowDOM is bad or anything, it's actually pretty amazing, but it's absolutely complementary with Custom Elements, not mandatory at all.

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

Received on Monday, 7 November 2016 10:11:57 UTC