Skip to content

Commit ba6e334

Browse files
[WebDriver BiDi] emulate user-agent string
1 parent e9ccb97 commit ba6e334

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

source

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4607,6 +4607,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
46074607
<li><dfn data-x="navigation-status-complete" data-x-href="https://w3c.github.io/webdriver-bidi/#navigation-status-complete">navigation status complete</dfn></li>
46084608
<li><dfn data-x="navigation-status-url" data-x-href="https://w3c.github.io/webdriver-bidi/#navigation-status-url">navigation status url</dfn></li>
46094609
<li><dfn data-x="navigation-status-suggested-filename" data-x-href="https://w3c.github.io/webdriver-bidi/#navigation-status-suggested-filename">navigation status suggested filename</dfn></li>
4610+
<li><dfn data-x-href="https://w3c.github.io/webdriver-bidi/#webdriver-bidi-emulated-user-agent">WebDriver BiDi emulated User-Agent</dfn></li>
46104611
<li><dfn data-x-href="https://w3c.github.io/webdriver-bidi/#webdriver-bidi-navigation-aborted">WebDriver BiDi navigation aborted</dfn></li>
46114612
<li><dfn data-x-href="https://w3c.github.io/webdriver-bidi/#webdriver-bidi-navigation-committed">WebDriver BiDi navigation committed</dfn></li>
46124613
<li><dfn data-x-href="https://w3c.github.io/webdriver-bidi/#webdriver-bidi-navigation-failed">WebDriver BiDi navigation failed</dfn></li>
@@ -118312,9 +118313,10 @@ interface <dfn interface>Navigator</dfn> {
118312118313
follows:</p>
118313118314

118314118315
<ol>
118315-
<li>Let <var>trail</var> be the substring of <span data-x="default-user-agent-value">default
118316-
`<code>User-Agent</code>` value</span> that follows the "<code data-x="">Mozilla/</code>"
118317-
prefix.</li>
118316+
<li>Let <var>userAgent</var> be <span data-x="dom-navigator-userAgent">userAgent</span>.</li>
118317+
118318+
<li>Let <var>trail</var> be the substring of <var>userAgent</var> that follows the "<code
118319+
data-x="">Mozilla/</code>" prefix.</li>
118318118320
<!-- Fetch doesn't actually require the value to start with "Mozilla/5.0 (". -->
118319118321

118320118322
<li>
@@ -118368,9 +118370,19 @@ interface <dfn interface>Navigator</dfn> {
118368118370

118369118371
<!-- securityPolicy: Mozilla only; always returns "" -->
118370118372

118371-
<p>The <dfn attribute for="NavigatorID"><code data-x="dom-navigator-userAgent">userAgent</code></dfn>
118372-
getter steps are to return the <span data-x="default-user-agent-value">default `<code>User-Agent</code>`
118373-
value</span>.</p>
118373+
<p>The <dfn attribute for="NavigatorID"><code
118374+
data-x="dom-navigator-userAgent">userAgent</code></dfn> getter steps are:</p>
118375+
118376+
<ol>
118377+
<li><p>Let <var>emulatedUserAgent</var> be the result of <span>WebDriver BiDi emulated
118378+
User-Agent</span> with <span>this</span>'s <span>relevant settings object</span>.</p></li>
118379+
118380+
<li><p>If <var>emulatedUserAgent</var> is not null, then return
118381+
<var>emulatedUserAgent</var>.</p></li>
118382+
118383+
<li><p>Return <span data-x="default-user-agent-value">default `<code>User-Agent</code>`
118384+
value</span>.</p></li>
118385+
</ol>
118374118386

118375118387
<p>The <dfn attribute for="NavigatorID"><code data-x="dom-navigator-vendor">vendor</code></dfn>
118376118388
getter steps are to return the appropriate string from the following list:</p>

0 commit comments

Comments
 (0)