-
Notifications
You must be signed in to change notification settings - Fork 43
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
Report feature policy violations #138
base: main
Are you sure you want to change the base?
Conversation
This only reports if the second check fails, but presumably it should also report when the first check fails? Could we bake reporting into "allowed to use" and suppress it the few times it should not happen? That might make it less likely to be overlooked. |
It seems best to only create reports when it the error was because of a policy violation. Doing that in https://html.spec.whatwg.org/multipage/iframe-embed-object.html#allowed-to-use makes sense to me too. |
I think there may be cases where the call to 'allowed-to-use' and the actual determination of a policy violation are separated in the spec algorithms. For those cases, are we still going to need to have a separate "report a violation now" entry point, or is it okay to just call allowed-to-use again? -- We could mention somewhere that allowed-to-use should be idempotent, so the result of the first call can be cached. |
I guess doing a survey of sorts across callers would be good, to find out the best API contract with the least amount of hassle for callers. |
@clelland how will you implement this? Will the checking and the reporting be entirely separate, will there be a flag to the check that says whether to report, or something else? Unless it's convoluted by implementation details that don't matter at the spec level, a similar structure in the spec might make sense. |
The current implementation in Chrome has an |
Sounds like the spec should match that pattern, provided it works well for the call sites. |
Sounds like a reasonable structure, yeah. @clelland, in this case, would the reporting be implicit or explicit? Seems to me given the structure that making it implicit in the check is the way to make sure a violation is only reported when that's the real reason fullscreen failed? |
This adds support for reporting violations of the fullscreen feature policy, which should only be triggered when a script actually tries to enter fullscreen in a document where that is not allowed. (Checking fullscreenEnabled, for instance, also involves a feature policy check, but would not trigger a violation report)
Preview | Diff