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

New Chrome iframe spec requires allow attribute to use devices #12225

Closed
RomainGoncalves opened this issue Feb 14, 2018 · 1 comment
Closed

Comments

@RomainGoncalves
Copy link

RomainGoncalves commented Feb 14, 2018

Do you want to request a feature or report a bug?
Not sure, maybe more on the feature side

What is the current behavior?
When opening an iframe to a third party site, I need access to the user's camera. The new specs for Chrome states that since version 64, we need to add the allow attribute in order to have access to things like camera or microphone.
However React (15.6.1) does not recognise this attribute and removes it. Therefore I don't have access to the user's camera.

<iframe
           title="Open identification process"
           src="thirdparty.com"
           frameBorder="0"
           width="600"
           height="800"
           allow="camera; microphone"
         />

Error displayed in console:

Warning: Unknown prop allow on <iframe> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop

What is the expected behavior?
This tag should be known

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React version: 15.6.1 (no real possibilities to change to 16 yet)
Chrome: Version 64.0.3282.140 (Official Build) (64-bit)
OS: MacOS Sierra

Sorry if this was already reported. I couldn't find another issue mentioning this.

@aweary
Copy link
Contributor

aweary commented Feb 14, 2018

Hey @RomainGoncalves! This behavior was changed with the React 16 release. You can see the blog post DOM Attributes in React 16 for details.

I know you said you can't updating to v16 just yet, but it's unlikely that we'll be making any more 15.x releases with changes to the attribute whitelist. We definitely recommend updating soon if you can (lots of great stuff coming!) but until then you can potentially use dangerouslySetInnerHTML as a workaround.

@aweary aweary closed this as completed Feb 14, 2018
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