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

Provide example permission policy control via JS Element.setAttribute() #426

Open
michaelwasserman opened this issue May 14, 2021 · 0 comments

Comments

@michaelwasserman
Copy link
Member

It may be valuable for the spec and/or explainer to show some example code using Element.setAttribute() on an iframe in JS to allow some permission, beyond specifying the 'allow' attribute in html. e.g. document.getElementById('iframe').setAttribute('allow', 'geolocation');

I wonder if's also helpful to clarify how that is handled after the document is loaded, since, for example section 6.2 says:

When not empty, the "allow" attribute will result in adding an allowlist for each recognized feature to the iframe element’s nested browsing context's container policy, when it is constructed.
What is expected to happen when the attribute is modified after construction?

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

1 participant