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

Updating gamepads test to match new spec #646

Merged
merged 2 commits into from Aug 6, 2012
Merged

Conversation

ebidel
Copy link
Contributor

@ebidel ebidel commented Aug 2, 2012

No description provided.

@@ -2,4 +2,5 @@
// https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html
// By Eric Bidelman

Modernizr.addTest('gamepads', !!Modernizr.prefixed('gamepads', navigator));
Modernizr.addTest('gamepads', !!Modernizr.prefixed('Gamepads', navigator) ||
!!Modernizr.prefixed('GetGamepads', navigator));
Copy link
Member

Choose a reason for hiding this comment

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

lowercase for both, actually. getGamepads. prefixed() will uppercase both while it checks for prefixes versions. but the standard unprefixed is targetting lower.

paulirish added a commit that referenced this pull request Aug 6, 2012
Updating gamepads test to match new spec
@paulirish paulirish merged commit eb5ed64 into Modernizr:master Aug 6, 2012
@paulirish
Copy link
Member

pulled. thx. i'm gonna make a note about FF's inability to feature detect.

@Ms2ger
Copy link
Contributor

Ms2ger commented Aug 16, 2012

Hey Paul, what do you mean by "FF's inability to feature detect"?

@paulirish
Copy link
Member

@Ms2ger I mean there is no way to feature detect support for the gamepad API in Firefox.

You can only see that gamepad events are firing, but cannot see that the API is available

A day after posting the above, I realized that gamepad support is only available in special builds and not even behind a flag in nightly firefox. So it's not a huge deal. Sounds like updating the impl to the newest spec rev will happen soon.

@Ms2ger
Copy link
Contributor

Ms2ger commented Aug 16, 2012

Oh, because we don't support the navigator property in the initial patch, right. |"GamePad" in window| should work, though.

@ebidel
Copy link
Contributor Author

ebidel commented Aug 16, 2012

IMO we should probably stay way from returning a false positive for FF's implementation.
It's not up to date with the current spec.

patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this pull request Feb 22, 2015
Updating gamepads test to match new spec
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.

None yet

3 participants