Skip to content

Resolve #8656 WebComponent 1.0 support. #8657

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed

Conversation

rektide
Copy link

@rektide rektide commented Dec 30, 2016

This is a straightforward update of the WebComponent example to match the final WebComponent 1.0 specification, which mandates ES6 Class syntax.

I'm unsure of any paths forward to maintaining support for old browsers while also supporting new ones, short of feature detection & having two separate codepaths. The situation in the aftermath of #8656 is un-ideal.

This PR depends on cdnjs adding the custom-element polyfill. Those changes are tracked in cdnjs/cdnjs#10108

This is a straightforward update of the WebComponent example to match the final 1.0 specification. To meet 1.0 spec, class syntax must be used.
I'm unsure of any paths forward to maintaing support for old browsers while also supporting new ones, short of feature detection & having two codepaths.
And lint a ; that followed examples/webcomponent's class XSearch.
@Jessidhia
Copy link
Contributor

Jessidhia commented Dec 31, 2016

@rektide the only alternative I can think of is using a Reflect polyfill, for Reflect.construct. You might also need a working Object.setPrototypeOf (can't polyfill).

@robdodson
Copy link

You can transpile down to ES5 (to support old browsers) and include the custom-elements-es5-adapter to support those browsers with native v1 Custom Element support.

@gaearon
Copy link
Collaborator

gaearon commented Nov 21, 2017

We've since updated this. Thanks for PR!

@gaearon gaearon closed this Nov 21, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants