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

Add permission policy integration #112

Merged
merged 13 commits into from
Oct 29, 2020
Merged

Conversation

marcoscaceres
Copy link
Member

@marcoscaceres marcoscaceres commented Sep 23, 2019

@marcoscaceres marcoscaceres changed the title added feautre policy section Add feature policy integration Sep 23, 2019
@marcoscaceres marcoscaceres force-pushed the sagoston/feature-policy branch from 4b6926f to 082254a Compare September 23, 2019 05:33
Copy link
Collaborator

@JamesHollyer JamesHollyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gamepad events also need protection. We should simply put something like "Events will not be fired unless the feature policy "gamepad" is enabled."

@marcoscaceres
Copy link
Member Author

Gamepad events also need protection. We should simply put something like "Events will not be fired unless the feature policy "gamepad" is enabled."

good point! I forgot they fire on the Window object.

Copy link
Collaborator

@JamesHollyer JamesHollyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see an issue number that gets closed by this change. But the change itself looks good to me.
Also fyi, I am currently implementing the metric for gamepad use in cross origin sub frames so we have more info on how to move forward with this breaking change.

@marcoscaceres
Copy link
Member Author

I would like to see an issue number that gets closed by this change.

#119 - once we have the telemetry data, we can move on the tests and implementation commitments.

index.html Outdated Show resolved Hide resolved
@marcoscaceres marcoscaceres changed the title Add feature policy integration Add permission policy integration Jul 17, 2020
@marcoscaceres marcoscaceres merged commit 792597d into gh-pages Oct 29, 2020
@marcoscaceres marcoscaceres deleted the sagoston/feature-policy branch October 29, 2020 22:58
@greggman
Copy link

broke a few hundred or thousand games on itch.io

@nondebug
Copy link
Collaborator

Which browser? As far as I know this change isn't enforced yet in Chrome or Firefox.

Can you link to an example of a game that was broken?

@greggman
Copy link

You're right. There's just a warning. So they'll all break in a few months but not today

@reillyeon
Copy link
Member

According to their documentation itch.io hosts web games by embedding an iframe. This is why this change will break a number of games but also means that the fix is simple. itch.io needs to add "gamepad" to the existing allow attribute in the <iframe> tags on their pages. They already appear to allow a number of other capabilities through this attribute so it seems that they understand how Permissions Policy works. If I'm correct then this shouldn't require any changes on the part of individual game authors. The change can be made unilaterally by itch.io.

@subsoap
Copy link

subsoap commented Feb 9, 2021

I have contacted the itch.io admin about this via e-mail. If the change is not done in a few days someone else should try pinging him via social media until he notices. He has been responsive about adding needed permissions before so it will likely be done before this is enforced.

@greggman
Copy link

greggman commented Feb 9, 2021

@reillyeon
Copy link
Member

Pinging @jpmedley for the MDN update. This change hasn't shipped in Chrome or Firefox but we've started to show a console warning so a note in MDN would be helpful as well.

@subsoap
Copy link

subsoap commented Feb 10, 2021

Gamepad permission has now been added to itch.io iframe. ✨

@byersdz
Copy link

byersdz commented Feb 28, 2021

I've added an allow="gamepad" attribute to the iframes on https://bitmelo.com however I am still getting this warning in Chrome. Am I handling this correctly or is there something else I need to do?

@nondebug
Copy link
Collaborator

nondebug commented Mar 1, 2021

@byersdz I tried Katana in Chrome 88.0.4324.182 (Official Build) (64-bit) but didn't see any gamepad-related console messages. I checked the source and everything seems fine.

Can you share the text of the console warning?

@reillyeon
Copy link
Member

I saw the message when I loaded https://bitmelo.com, I think I understand the issue and have filed https://crbug.com/1183491 to track the fix.

@subsoap
Copy link

subsoap commented Jul 24, 2021

Is this required yet? When adding the permission to iframes (allow="gamepad") it still prints

Unrecognized feature: 'gamepad'.

But it also still mentions

VM17:1 getGamepad will now require a Permission Policy. Please update your application accordingly. For more information see #112

Seen here in console

https://www.pixcade.com/big-klondike/

@marcoscaceres
Copy link
Member Author

@subsoap, I believe it should be "coming soon". @JamesHollyer, any update?

@marcoscaceres
Copy link
Member Author

Filed WebKit bug https://bugs.webkit.org/show_bug.cgi?id=230136 ... will implement that.

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

Successfully merging this pull request may close these issues.

Feature policy integration
9 participants