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

is.chrome() returns true in edge #314

Open
beccabrown opened this issue Jun 30, 2020 · 2 comments
Open

is.chrome() returns true in edge #314

beccabrown opened this issue Jun 30, 2020 · 2 comments

Comments

@beccabrown
Copy link

This is because the vendor in self.navigator.vendor in edge is Google Inc. and Chrome is part of the user-agent. In older versions of edge, the vendor was blank.

@humayunkabir
Copy link

When I run navigator.userAgent in Edge console, I see this.

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36 Edg/86.0.622.38

I think, we can check Edg for Edge.

@evdama
Copy link

evdama commented Mar 30, 2022

I have no MS Edge to test this with but
,,,js
is.edge = range => {
const match = userAgent.match(/edg(e|a|ios)?/(\d+)/)
return match !== null && compareVersion(match[1], range)
,,,

from https://github.com/evdama/is-it-check seems to not have this issue? Can you check please?

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

No branches or pull requests

3 participants