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

FF91 - Update docs with Feature-Policy: Gamepad and secure context #7269

Merged
merged 7 commits into from
Jul 26, 2021

Conversation

hamishwillee
Copy link
Collaborator

FF91 starts protecting the gamepad API using Feature-Policy: gamepad, and also only allows this to be called in secure contexts. This PR

  • Adds secure context header to all Gamepad API docs
  • Adds docs for the new permission policy
  • Adds info about the new permission policy in the API docs that are directly affected.

More context can be found in #6723

@hamishwillee hamishwillee requested review from a team as code owners July 26, 2021 04:33
@hamishwillee hamishwillee requested review from mirunacurtean and jpmedley and removed request for a team July 26, 2021 04:33
@github-actions
Copy link
Contributor

github-actions bot commented Jul 26, 2021

Preview URLs

Flaws

Note! 4 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/HTTP/Headers/Feature-Policy
Title: Feature-Policy
on GitHub
Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/Navigator/requestMIDIAccess does not exist

URL: /en-US/docs/Web/HTTP/Headers/Feature-Policy/gamepad
Title: Feature-Policy: gamepad
on GitHub
Flaw count: 1

  • bad_bcd_queries:
    • No BCD data for query: http.headers.Feature-Policy.gamepad

URL: /en-US/docs/Web/HTTP/Feature_Policy
Title: Feature Policy
on GitHub
Flaw count: 1

  • broken_links:
    • Is currently http:// but can become https://

URL: /en-US/docs/Web/API/Window/gamepaddisconnected_event
Title: Window: gamepaddisconnected event
on GitHub
Flaw count: 5

  • macros:
    • /en-us/docs/web/api/globalcrypto (url: /en-US/docs/Web/API/GlobalCrypto) does not exist
    • /en-us/docs/web/api/speechsynthesisgetter (url: /en-US/docs/Web/API/SpeechSynthesisGetter) does not exist
    • /en-us/docs/web/api/windowmodal (url: /en-US/docs/Web/API/WindowModal) does not exist
    • /en-us/docs/web/api/onerroreventhandlerforwindow (url: /en-US/docs/Web/API/OnErrorEventHandlerForWindow) does not exist
    • /en-us/docs/web/api/chromewindow (url: /en-US/docs/Web/API/ChromeWindow) does not exist

URL: /en-US/docs/Web/API/Window/gamepadconnected_event
Title: Window: gamepadconnected event
on GitHub
Flaw count: 5

  • macros:
    • /en-us/docs/web/api/globalcrypto (url: /en-US/docs/Web/API/GlobalCrypto) does not exist
    • /en-us/docs/web/api/speechsynthesisgetter (url: /en-US/docs/Web/API/SpeechSynthesisGetter) does not exist
    • /en-us/docs/web/api/windowmodal (url: /en-US/docs/Web/API/WindowModal) does not exist
    • /en-us/docs/web/api/onerroreventhandlerforwindow (url: /en-US/docs/Web/API/OnErrorEventHandlerForWindow) does not exist
    • /en-us/docs/web/api/chromewindow (url: /en-US/docs/Web/API/ChromeWindow) does not exist

URL: /en-US/docs/Web/API/GamepadButton
Title: GamepadButton
on GitHub
Flaw count: 2

  • macros:
    • wrong xref macro used (consider changing which macro you use)
  • bad_bcd_links:
    • no explanation!

URL: /en-US/docs/Web/API/GamepadEvent
Title: GamepadEvent
on GitHub
Flaw count: 4

  • macros:
    • /en-US/docs/Web/API/Window/gamepadconnected does not exist
    • /en-US/docs/Web/API/Window/gamepaddisconnected does not exist
    • /en-US/docs/Web/API/Window/gamepadconnected does not exist
    • /en-US/docs/Web/API/Window/gamepaddisconnected does not exist

URL: /en-US/docs/Web/API/Navigator/getGamepads
Title: Navigator.getGamepads()
on GitHub
Flaw count: 1

  • broken_links:
    • Can't resolve /en-US/docs/Web/Guide/API/Gamepad

External URLs

URL: /en-US/docs/Web/HTTP/Headers/Feature-Policy
Title: Feature-Policy
on GitHub

No new external URLs


URL: /en-US/docs/Web/HTTP/Headers/Feature-Policy/gamepad
Title: Feature-Policy: gamepad
on GitHub

No new external URLs


URL: /en-US/docs/Web/HTTP/Feature_Policy
Title: Feature Policy
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/Window/gamepaddisconnected_event
Title: Window: gamepaddisconnected event
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/Window/gamepadconnected_event
Title: Window: gamepadconnected event
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/Gamepad
Title: Gamepad
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/GamepadButton
Title: GamepadButton
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/GamepadHapticActuator
Title: GamepadHapticActuator
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/GamepadEvent
Title: GamepadEvent
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/GamepadEvent/gamepad
Title: GamepadEvent.gamepad
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/Navigator/getGamepads
Title: Navigator.getGamepads()
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/Gamepad_API
Title: Gamepad API
on GitHub

No new external URLs

(this comment was updated 2021-07-26 09:10:51.425155)

@Elchi3
Copy link
Member

Elchi3 commented Jul 26, 2021

  • Adds secure context header to all Gamepad API docs

Is it really needed to warn on all pages? Would it be sufficient enough to have the banner on interface pages and navigator.getGamepads?

@hamishwillee
Copy link
Collaborator Author

@Elchi3 Technically it depends on how you come to the information. But I agree that almost always you will first come to the interface page, and then to methods etc. I will assume your comment is "policy" and fix up appropriately. Thanks.

@Elchi3
Copy link
Member

Elchi3 commented Jul 26, 2021

I'm not sure if this is our policy but I think it should be. See also #7070

Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

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

LGTM, nice! 👍

@Elchi3 Elchi3 merged commit 03341bc into mdn:main Jul 26, 2021
@hamishwillee hamishwillee deleted the FF91_gamepad branch July 26, 2021 21:51
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants