Skip to content

Commit

Permalink
Adding PublicKeyCredential feature detect for webauthn (#2393)
Browse files Browse the repository at this point in the history
* Adding PublicKeyCredential feature detect for webauthn

* Undoing package-lock.json, adding author tag
  • Loading branch information
escodel authored and rejas committed Nov 12, 2018
1 parent 1ef3bc8 commit e8bb349
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 31 deletions.
31 changes: 31 additions & 0 deletions feature-detects/webauthn/publickeycredential.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*!
{
"name": "PublicKeyCredential",
"notes": [
{
"name": "MDN Documentation",
"href": "https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential"
},
{
"name": "Google Developers solution",
"href": "https://developers.google.com/web/updates/2018/03/webauthn-credential-management#the_solution"
}
],
"property": "publicKeyCredential",
"tags": ["webauthn", "web authentication"],
"authors": ["Eric Delia"]
}
!*/
/* DOC
Detects support for PublicKeyCredential as part of the Web Authentication API (also known as webauthn)
*/

define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('publicKeyCredential', function() {
if (window.PublicKeyCredential) {
return true;
}

return false;
});
});
3 changes: 2 additions & 1 deletion lib/config-all.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@
"vml",
"web-intents",
"webanimations",
"webauthn/publickeycredential",
"webgl",
"webgl/extensions",
"webrtc/datachannel",
Expand All @@ -293,4 +294,4 @@
"workers/webworkers",
"xdomainrequest"
]
}
}
60 changes: 30 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e8bb349

Please sign in to comment.