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 [SecureContext] tags to the interfaces #192

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion extensions.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ <h2>
and acceleration.
</p>
<pre class="idl">
[Exposed=Window]
[Exposed=Window, SecureContext]
interface GamepadPose {
readonly attribute boolean hasOrientation;
readonly attribute boolean hasPosition;
Expand Down Expand Up @@ -361,6 +361,7 @@ <h2>
the main <a href="https://w3c.github.io/gamepad/">Gamepad spec</a>.
</p>
<pre class="idl">
[SecureContext]
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is valid... it's a partial interface.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
[SecureContext]

partial interface Gamepad {
readonly attribute GamepadHand hand;
readonly attribute FrozenArray&lt;GamepadHapticActuator&gt; hapticActuators;
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ <h2>
feedback.
</p>
<pre class="idl">
[Exposed=Window]
[Exposed=Window, SecureContext]
Copy link
Member

Choose a reason for hiding this comment

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

Not sure this one makes sense either, to be honest. Half of the API is exposed in a regular context, and taking this interface away would probably break things.

interface GamepadHapticActuator {
[SameObject] readonly attribute FrozenArray&lt;GamepadHapticEffectType&gt; effects;
Promise&lt;GamepadHapticsResult&gt; playEffect(
Expand Down Expand Up @@ -1526,7 +1526,7 @@ <h2>
<pre class="idl">
[Exposed=Window]
partial interface Navigator {
sequence&lt;Gamepad?&gt; getGamepads();
[SecureContext] sequence&lt;Gamepad?&gt; getGamepads();
Copy link
Member

Choose a reason for hiding this comment

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

This wouldn't be web compatible. See #113.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
[SecureContext] sequence&lt;Gamepad?&gt; getGamepads();
sequence&lt;Gamepad?&gt; getGamepads();

};
</pre>
<p>
Expand Down