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

Use window.navigator.vendor to detect chromium-based browsers #1449

Merged
merged 2 commits into from
Nov 18, 2021

Conversation

annagrin
Copy link
Contributor

Previously we used window.navigator.userAgent to detect if the
browser is chromium-based, but that detection fails during iphone
simulation in chrome or egde.

Change the detection to use window.navigator.vendor instead.

Closes: flutter/flutter#92567

Anna Gringauze added 2 commits November 18, 2021 11:14
Previously we used `window.navigator.userAgent` to detect if the
browser is chromium-based, but that detection fails during iphone
simulation in chrome or egde.

Change the detection to use `window.navigator.vendor` instead.

CLoses: flutter/flutter#92567
Copy link
Contributor

@nshahan nshahan left a comment

Choose a reason for hiding this comment

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

I'm not sure how we use the _isChromium flag but do we actually want it to return true on Edge? Does Edge provide the same devtools API as Chrome?

@annagrin
Copy link
Contributor Author

I'm not sure how we use the _isChromium flag but do we actually want it to return true on Edge? Does Edge provide the same devtools API as Chrome?

Yes to both questions. I run this on my windows machine with edge and chrome with various emulators to confirm.

@annagrin annagrin merged commit bd399e1 into dart-lang:master Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants