Skip to content
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

Clarify script.addPreloadScript with duplicate context #620

Merged
merged 5 commits into from
Dec 19, 2023
Merged
Changes from 3 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
10 changes: 7 additions & 3 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -8292,16 +8292,20 @@ The [=remote end steps=] given |session| and |command parameters| are:
1. Let |arguments| be the <code>arguments</code> field of |command
parameters| if present, or an empty [=/list=] otherwise.

1. Let the |contexts| be the value of the <code>contexts</code> field of |command parameters| if it is present or null if it isn’t.
1. If the <code>contexts</code> field of |command parameters| is present:

1. If |contexts| is not null:
1. Let |contexts| be an empty [=/set=].
sadym-chromium marked this conversation as resolved.
Show resolved Hide resolved
sadym-chromium marked this conversation as resolved.
Show resolved Hide resolved

1. For each |context id| of |contexts|:
1. For each |context id| of |command parameters|["<code>contexts</code>"]

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. Append |context| to |contexts|.

1. Otherwise let |contexts| to null.
whimboo marked this conversation as resolved.
Show resolved Hide resolved

1. Let |sandbox| be the value of the "<code>sandbox</code>" field in |command
parameters|, if present, or null otherwise.

Expand Down