Skip to content

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

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

Merged
merged 2 commits into from
Nov 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dwds/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
used by DDR, and is not yet supported for amd modules that are used by
flutter tools and webdev.

- Fix chrome detection in iPhone emulation mode in chrome or edge browsers.

## 11.4.0

- Fix duplicated scripts returned by `VmService.getScripts` API.
Expand Down
39 changes: 29 additions & 10 deletions dwds/lib/src/injected/client.js

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

2 changes: 1 addition & 1 deletion dwds/web/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,4 @@ external set emitDebugEvent(void Function(String, String) func);
@JS(r'$emitRegisterEvent')
external set emitRegisterEvent(void Function(String) func);

bool get _isChromium => window.navigator.userAgent.contains('Chrome');
bool get _isChromium => window.navigator.vendor.contains('Google');