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

Adding "allow" attribute to iframe tag #200

Open
johndhancock opened this issue Jan 4, 2024 · 3 comments
Open

Adding "allow" attribute to iframe tag #200

johndhancock opened this issue Jan 4, 2024 · 3 comments

Comments

@johndhancock
Copy link

Is it possible to add the allow attribute as one of the configuration options for the parent instance?

I have an embed that attempts to use the user's location via the geolocation api in the browser to customize content of the embed. In order to do this is in the generated iframe, I need to add the allow parameter to the iframe tag with a value of 'geolocation'.

@thomaswilburn
Copy link

You may want to look at Sidechain, which is Pym-compatible and supports allow attribute pass-through: https://github.com/nprapps/sidechain

@johndhancock
Copy link
Author

Thanks for the tip. Forgive me if I'm missing it, but is there documentation on how to pass through the attribute?

@thomaswilburn
Copy link

There isn't, I never added documentation for it. But if you set <side-chain src="..." allow="..."></side-chain>, it should carry it through to the internal iframe.

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