Skip to content

Webdriver bidi #967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 66 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,8 @@ EventData = (
InputEvent //
LogEvent //
NetworkEvent //
ScriptEvent
ScriptEvent //
SpeculationEvent
)
</pre>

Expand Down Expand Up @@ -10463,7 +10464,7 @@ value is provided only for one of the remote values, while the
unique-per-ECMAScript-object <code>internalId</code> is provided for all the
duplicated objects for a given serialization.

[=Nodes=] are also represented by <code>script.RemoteValue</code>
Nodes are also represented by <code>script.RemoteValue</code>
instances. These have a partial serialization of the node in the value property.

Issue: reconsider mirror objects' lifecycle.
Expand Down Expand Up @@ -13395,6 +13396,69 @@ The [=remote end steps=] with |command parameters| are:

</div>

## The speculation Module ## {#module-speculation}

The <dfn export for=modules>speculation</dfn> module contains events
relating to resource speculation including preloading and prefetching.

### Definition ### {#module-speculation-definition}

{^Local end definition^}

<pre class="cddl" data-cddl-module="local-cddl">
SpeculationEvent = (
speculation.PrefetchStatusUpdated
)
</pre>

### Types ### {#module-speculation-types}

#### The speculation.PrefetchStatus Type #### {#type-speculation-PrefetchStatus}

<pre class="cddl" data-cddl-module="local-cddl">
speculation.PrefetchStatus = "pending" / "running" / "success" / "failure"
</pre>

The <code>speculation.PrefetchStatus</code> type represents the status of a prefetch operation.

### Events ### {#module-speculation-events}

#### The speculation.prefetchStatusUpdated Event #### {#event-speculation-prefetchStatusUpdated}

<dl>
<dt>Event Type</dt>
<dd>
<pre class="cddl" data-cddl-module="local-cddl">
speculation.PrefetchStatusUpdated = {
method: "speculation.prefetchStatusUpdated",
params: speculation.PrefetchStatusUpdatedParameters
}

speculation.PrefetchStatusUpdatedParameters = {
initiatingFrameId: js-uint,
url: text,
status: speculation.PrefetchStatus,
}
</pre>
</dd>
</dl>

<div algorithm="remote end event trigger for speculation.prefetchStatusUpdated">
The remote end event trigger for the speculation.prefetchStatusUpdated event,
given |session|, |initiatingFrameId|, |url|, and |status|:

1. Let |params| be a new struct.

1. Set |params|["<code>initiatingFrameId</code>"] to |initiatingFrameId|.

1. Set |params|["<code>url</code>"] to |url|.

1. Set |params|["<code>status</code>"] to |status|.

1. Emit an event with |session|, "<code>speculation.prefetchStatusUpdated</code>", and |params|.

</div>

# Patches to Other Specifications # {#patches}

This specification requires some changes to external specifications to provide the necessary
Expand Down
6 changes: 3 additions & 3 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash
set -ex

if ! [ -x "$(command -v bikeshed)" ]; then
if ! python3 -c "import bikeshed" 2>/dev/null; then
echo 'Installing bikeshed'
python3 -m pip install bikeshed
elif [ "$1" = "--upgrade" ]; then
echo 'Upgrading bikeshed'
python3 -m pip install --upgrade bikeshed
fi

bikeshed update
bikeshed --die-on=warning spec index.bs
python3 -m bikeshed update
python3 -m bikeshed --die-on=warning spec index.bs
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [[ "$(npm list parse5)" =~ "empty" ]] || [ "$1" = "--upgrade" ]; then
fi

# Extract CDDL content from spec into files
"$ROOT"/scripts/cddl/generate.js
node.exe "$ROOT"/scripts/cddl/generate.js

cddl compile-cddl --cddl local.cddl
cddl compile-cddl --cddl remote.cddl
Expand Down