Skip to content

Commit

Permalink
Add capability processing
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN committed Nov 21, 2023
1 parent 3f0bb48 commit 5421b69
Showing 1 changed file with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1400,6 +1400,7 @@ for a session.
<pre class="cddl remote-cddl local-cddl">
session.CapabilityRequest = {
? acceptInsecureCerts: bool,
? interceptFileDialogs: bool,
? browserName: text,
? browserVersion: text,
? platformName: text,
Expand Down Expand Up @@ -1444,6 +1445,34 @@ with parameter |value| is:

</div>

<pre class=simpledef>
Capability: <dfn export>intercept file dialogs</dfn>
Key: "<code>interceptFileDialogs</code>"
Value type: boolean
Description: Defines whether the file dialogs should be intercepted and not shown on screen.
</pre>

<div algorithm="interceptFileDialogs capability deserialization algorithm">
The [=additional capability deserialization algorithm=] for the
"<code>interceptFileDialogs</code>" capability, with parameter |value| is:

1. If |value| is not a boolean, return [=error=] with [=error code|code=]
[=invalid argument=].

1. Return [=success=] with data |value|.

</div>

<div algorithm="interceptFileDialogs capability serialization algorithm">
The [=matched capability serialization algorithm=] for the "<code>interceptFileDialogs</code>" capability,
with parameter |value| is:

1. If |value| is false, return [=success=] with data null.

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

</div>

#### The session.ProxyConfiguration Type #### {#type-session-ProxyConfiguration}

[=remote end definition=] and [=local end definition=]
Expand Down Expand Up @@ -9638,7 +9667,23 @@ opened</dfn> steps given |element|.

1. [=Emit an event=] with |session| and |body|.

1. Return true.
1. Let |intercepting sessions| be the [=set of sessions for which file dialog interception is enabled=].

1. Return false if |intercepting sessions| is empty, and true otherwise.

</div>

<div algorithm>

The <dfn>set of sessions for which file dialog interception is enabled</dfn> is:

1. Let |sessions| be a new [=/set=].

1. For each |session| in [=active BiDI sessions=]:

1. If |session|'s [=intercept file dialogs=] capability is true, append |session| to |sessions|.

1. Return |sessions|.

</div>

Expand Down

0 comments on commit 5421b69

Please sign in to comment.