@@ -200,8 +200,9 @@ spec: HTML; urlPrefix: https://html.spec.whatwg.org/multipage/
200200 text: shared worker; url: workers.html#shared-workers
201201 text: system visibility state; url: document-sequences.html#system-visibility-state
202202 text: traversable navigable; url:document-sequences.html#traversable-navigable
203- text: visible; url: document-sequences.html#system-visibility-state
204203 text: traverse the history by a delta; url: browsing-the-web.html#traverse-the-history-by-a-delta
204+ text: user agent; url: system-state.html#dom-navigator-useragent
205+ text: visible; url: document-sequences.html#system-visibility-state
205206 text: window open steps; url: window-object.html#window-open-steps
206207 text: worker event loop; url: webappapis.html#worker-event-loop-2
207208 text: worklet global scopes; url:worklets.html#concept-document-worklet-global-scopes
@@ -1880,6 +1881,7 @@ BrowsingContextCommand = (
18801881 browsingContext.Navigate //
18811882 browsingContext.Print //
18821883 browsingContext.Reload //
1884+ browsingContext.SetUserAgent //
18831885 browsingContext.SetViewport //
18841886 browsingContext.TraverseHistory
18851887)
@@ -3406,6 +3408,58 @@ The [=remote end steps=] with |command parameters| are:
34063408
34073409</div>
34083410
3411+ #### The browsingContext.setUserAgent Command #### {#command-browsingContext-setUserAgent}
3412+
3413+ The <dfn export for=commands>browsingContext.setUserAgent</dfn> command sets the
3414+ {{NavigatorID/userAgent}} string for a browsing context.
3415+
3416+ <dl>
3417+ <dt> Command Type</dt>
3418+ <dd>
3419+ <pre class="cddl remote-cddl">
3420+ browsingContext.SetUserAgent = (
3421+ method: "browsingContext.setUserAgent",
3422+ params: browsingContext.SetUserAgentParameters
3423+ )
3424+
3425+ browsingContext.SetUserAgentParameters = {
3426+ context: browsingContext.BrowsingContext,
3427+ userAgent: text / null,
3428+ }
3429+ </pre>
3430+ </dd>
3431+ <dt> Result Type</dt>
3432+ <dd>
3433+ <pre class="cddl">
3434+ EmptyResult
3435+ </pre>
3436+ </dd>
3437+ </dl>
3438+
3439+ <div algorithm="remote end steps for browsingContext.setUserAgent">
3440+
3441+ The [=remote end steps=] with |command parameters| are:
3442+
3443+ 1. Let |context id| be the value of the <code> context</code> field of |command
3444+ parameters|.
3445+
3446+ 1. Let |context| be the result of [=trying=] to [=get a browsing context=] with
3447+ |context id|.
3448+
3449+ 1. Let |user agent| be the value of the <code> userAgent</code> field of |command
3450+ parameters| if present, or null otherwise.
3451+
3452+ 1. If |user agent| is not null:
3453+
3454+ 1. Set |context|'s [=user agent=] to |user agent|.
3455+
3456+ 1. Otherwise, set |context|'s {{NavigatorID/userAgent}} to the
3457+ implementation-defined [=default `user-agent` value=] .
3458+
3459+ 1. Return [=success=] with data null.
3460+
3461+ </div>
3462+
34093463#### The browsingContext.setViewport Command #### {#command-browsingContext-setViewport}
34103464
34113465The <dfn export for=commands>browsingContext.setViewport</dfn> command specific viewport characteristics (e.g. viewport width and viewport height) on the given top-level browsing context.
0 commit comments