-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Ignore whitelisted attributes for native custom elements. #3752
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Yeah, let's check the status of #3067 and once we figure out what to do there, we can take another look at this PR. |
sounds good |
f129e0d
to
c63ffbc
Compare
Should be Ideally we would do something intelligent when the value of the |
@@ -686,7 +686,7 @@ ReactDOMComponent.Mixin = { | |||
} else if (lastProp) { | |||
deleteListener(this._rootNodeID, propKey); | |||
} | |||
} else if (this._tag.indexOf('-') >= 0) { | |||
} else if (this._tag.indexOf('-') >= 0 || props.hasOwnProperty('is')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use nextProps
here, not props
(which is undefined).
@spicyj Just to confirm, you're looking for a helper function that takes in tag&props to decide if the element is a webcomponent? |
Yeah. It was more convincing when I thought it could just take |
c63ffbc
to
7256f09
Compare
Is this what yall where thinking? |
Thanks @jhicken! Looks great to me. |
Ignore whitelisted attributes for native custom elements.
#140
This will cause react to ignore the regular props/attributes whitelist if the tag name for an element contains a
-
or if the element has anis
attribute applied to it. This makes you able to use native custom elements via theis
attribute or by adding a-
your custom element tag name.I just threw this together real quick. I just want to make sure I'm running down a good path with it.