Skip to content

Conversation

sadym-chromium
Copy link

@sadym-chromium sadym-chromium commented Aug 19, 2025

Support for user-agent emulations. WebDriver BiDi specification: https://www.w3.org/TR/webdriver-bidi/#command-emulation-setUserAgentOverride

  • At least two implementers are interested (and none opposed):
  • Tests are written and can be reviewed and commented upon at:
  • Implementation bugs are filed:
    • Chromium: …
    • Gecko: …
    • WebKit: …
    • Deno (not for CORS changes): …
  • MDN issue is filed: …
  • The top of this comment includes a clear commit message to use.

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

Support for user-agent emulations.
@sadym-chromium sadym-chromium changed the title WebDriver BiDi emulated user-agent [WebDriver BiDi] emulate user-agent string Aug 19, 2025
sadym-chromium added a commit to w3c/webdriver-bidi that referenced this pull request Sep 10, 2025
Specification for `emulation.setUserAgentOverride` command. 
* Introduce a new hook "WebDriver BiDi emulated User-Agent".
* Fetch spec update required, as the default `User-Agent` headers is set BEFORE the "[WebDriver BiDi before request sent](https://w3c.github.io/webdriver-bidi/#webdriver-bidi-before-request-sent)" is invoked, so there is no way to distinguish between the user explicitly set the `User-Agent` vs the [default `User-Agent` value](https://fetch.spec.whatwg.org/#default-user-agent-value) was used. Use the hook in Fetch spec: whatwg/fetch#1851
* HTML spec update required to return the proper `User-Agent` as the result of the `navigator.userAgent`. Use the hook in HTML spec: whatwg/html#11576
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant