Skip to content

Commit

Permalink
Add browsingContext.bringToFront
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN committed Jun 23, 2023
1 parent 88f40d0 commit 42c271c
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2124,6 +2124,50 @@ document loading at which a navigation command will return.

### Commands ### {#module-browsingContext-commands}

#### The browsingContext.bringToFront Command #### {#command-browsingContext-bringToFront}

The <dfn export for=commands>browsingContext.bringToFront</dfn> command activates and focuses the given top-level browsing context.

<dl>
<dt>Command Type</dt>
<dd>
<pre class="cddl remote-cddl">
browsingContext.BringToFront = {
method: "browsingContext.bringToFront",
params: browsingContext.BringToFrontParameters
};

browsingContext.BringToFrontParameters = {
context: browsingContext.BrowsingContext
}
</pre>
</dd>
<dt>Result Type</dt>
<dd>
<pre class="cddl">
EmptyResult
</pre>
</dd>
</dl>

<div algorithm="remote end steps for browsingContext.bringToFront">

The [=remote end steps=] with |command parameters| are:

1. Let |context id| be the value of the |command parameters|["<code>context</code>"] field.

1. Let |context| be the result of [=trying=] to [=get a browsing context=] with |context id|.

1. If |context| is not a [=top-level browsing context=], return [=error=] with [=error code=] [=invalid argument=].

1. Run implementation-specific steps to bring the |context| to the top of the implementation-specific view hierarchy.

1. Run implementation-specific steps to set the [[multipage/interaction#system-focus]] on the |context| if it is not focused.

1. Return [=success=] with data null.

</div>

#### The browsingContext.captureScreenshot Command #### {#command-browsingContext-captureScreenshot}

The <dfn export for=commands>browsingContext.captureScreenshot</dfn> command
Expand Down

0 comments on commit 42c271c

Please sign in to comment.