Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

The polyfill example wont work in safari #21

Closed
kenchris opened this issue Mar 4, 2020 · 1 comment
Closed

The polyfill example wont work in safari #21

kenchris opened this issue Mar 4, 2020 · 1 comment

Comments

@kenchris
Copy link

kenchris commented Mar 4, 2020

As Apple decided to never support extending any element but HTMLElement

@samuelgoto
Copy link
Collaborator

samuelgoto commented Mar 19, 2020

Ah, fair, agreed. I guess polyfill isn't the right word, because this isn't something that can be done purely in userland, but rather requires access to browser internals.

The intent with the example here was to show that you can use the declarative API in a browser that only supports the imperative API (e.g. chrome, hence the use of the custom element) with some help from frameworks.

So, the following:

<script src="framework.js"></script>
<input is="one-time-code" autocomplete="one-time-code">

Would work both in chrome (because the "is" custom element would use the imperative API) and safari (because the "is" would be ignored and the autocomplete="one-time-code" would take care of it too).

I'm going to rename the wording here from "polyfill" to "emulating" in the proposal and the spec text.

I hope this makes it clearer.

I'm going to resolve, unless there is any further clarification I can provide or anything you'd like me to act on, in which case feel free to re-open and I'd be happy to course correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants