-
Notifications
You must be signed in to change notification settings - Fork 47.1k
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
Added 'is' attribute for custom elements #3930
Conversation
It should be |
@syranide thanks 👍 PR updated. |
cc @jimfb - not sure what the state of web components support is, but let's make sure this fits into the general plan. |
Seems like it could be! |
As far as I understand the In the above case: document.registerElement('taco-button', {
prototype: HTMLButtonElement.prototype,
extends: 'button'
}); |
@Wildhoney The code I pasted is from the W3 TR above. |
@syranide sorry, I misunderstood your point. Yep, you're right – #3067 won't solve this for the reason you mentioned – the <custom-element is="another-custom-element" /> |
Ok, I think you're right, looks like this can be applied to standard DOM elements. I'm fine with moving forward with this diff, pending approval from @zpao et al. |
@zpao Approved for merge? |
@Wildhoney I think there is a merge conflict. Can you rebase? @zpao @spicyj This looks good to me. Any objections to merging? Let me know! |
Good with me. |
Sorry, I accidentally removed |
Can you squash your commits together? |
@spicyj Is this okay? |
Try doing a git rebase -i origin/master and then delete all lines but the one commit where you actually added it, then you can force-push to the same branch to update this PR. |
When you're done, the Commits tab here will have only one commit. |
Done 👍 I was missing the |
Thanks @spicyj |
Added 'is' attribute for custom elements
Thank you! |
I've been extending out my current project for webcomponents in React, and I noticed that the
is
attribute isn't supported for React, and is therefore pruned from the element.I can't be entirely sure this isn't intentional, but I thought I'd open a PR nonetheless. I think it definitely should be in the framework. If not, it would be nice to know what the rationale behind its exclusion is/was.