Skip to content
This repository was archived by the owner on Mar 2, 2021. It is now read-only.

Only load polyfill in Chrome#2

Merged
btoews merged 1 commit intomasterfrom
chrome_only
Oct 26, 2015
Merged

Only load polyfill in Chrome#2
btoews merged 1 commit intomasterfrom
chrome_only

Conversation

@btoews
Copy link
Contributor

@btoews btoews commented Oct 26, 2015

This PR prevents the polyfill from loading in non-Chrome browsers. It also checks that window.u2f is undefined, in case Chrome ever implements the high-level API.

The diff is easier to look at with ?w=1

/cc @dgraham

@dgraham
Copy link

dgraham commented Oct 26, 2015

👍

btoews pushed a commit that referenced this pull request Oct 26, 2015
Only load polyfill in Chrome
@btoews btoews merged commit 7675a1d into master Oct 26, 2015
@btoews btoews deleted the chrome_only branch October 26, 2015 16:30
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dgraham Would it make sense that this line is getting hoisted, causing 'u2f' in window to return true?

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.

3 participants