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

Add ability to configure navigator.userAgentData.brands at runtime #3770

Open
BrianAndersonMozenda opened this issue Aug 13, 2024 · 2 comments
Labels
enhancement Enhancement request help wanted Issue resolution will likely require community contributions

Comments

@BrianAndersonMozenda
Copy link

Describe the bug
Because the navigator.userAgentData.brands is a internal readonly property it can't be overridden to be able to create a brand browser.

To Reproduce
Steps to reproduce the behavior:

  1. Open cefclient
  2. Open DevTools
  3. Open the Console
  4. Type "navigator.userAgentData"
  5. Note that the default readonly property is returned

Expected behavior
Have the ability to override the brands property similar to Brave, Chrome, and Edge. We provide a pseudo-browser to our customers and we would like to be able to override these properties.

https://developer.mozilla.org/en-US/docs/Web/API/NavigatorUAData

Screenshots
image

@BrianAndersonMozenda BrianAndersonMozenda added the bug Bug report label Aug 13, 2024
@magreenblatt
Copy link
Collaborator

Branding is a compile-time value from chrome/app/theme/chromium/BRANDING. Currently, you will need to generate your own custom CEF/Chromium builds to configure this.

The NavigatorUIData is populated via GetUserAgentMetadata, so it may also be possible to configure this particular value at runtime with Chromium code changes.

@magreenblatt magreenblatt added enhancement Enhancement request help wanted Issue resolution will likely require community contributions and removed bug Bug report labels Aug 14, 2024
@magreenblatt magreenblatt changed the title Unable to set navigator.userAgentData.brands property Add ability to configure navigator.userAgentData.brands at runtime Aug 14, 2024
@amaitland
Copy link
Contributor

The following might be worth a try

https://chromedevtools.github.io/devtools-protocol/tot/Emulation/#type-UserAgentBrandVersion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement request help wanted Issue resolution will likely require community contributions
Projects
None yet
Development

No branches or pull requests

3 participants