Skip to content

Commit da7ada3

Browse files
committed
Return "no such frame" error instead "invalid argument"
1 parent 01ae7be commit da7ada3

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

index.bs

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,22 @@ To <dfn>get top-level traversables</dfn> given a [=/list=] of [=/navigables=] |n
11721172

11731173
</div>
11741174

1175+
<div algorithm>
1176+
1177+
To <dfn>get valid navigables by ids</dfn> given a [=/list=] of context ids |navigable ids|:
1178+
1179+
1. Let |result| be an empty [=/set=].
1180+
1181+
1. For each |navigable id| in |navigable ids|:
1182+
1183+
1. Let |navigable| be the result of [=trying=] to [=get a navigable=] with |navigable id|.
1184+
1185+
1. [=set/Append=] |navigable| to |result|.
1186+
1187+
1. Return [=success=] with data |result|.
1188+
1189+
</div>
1190+
11751191
<div algorithm> To <dfn export>emit an event</dfn> given |session|, and |body|:
11761192

11771193
1. [=Assert=]: |body| has [=map/size=] 2 and [=map/contains=] "<code>method</code>"
@@ -1982,11 +1998,7 @@ The [=remote end steps=] with |session| and |command parameters| are:
19821998

19831999
1. If |input context ids| is not empty:
19842000

1985-
1. Let |navigables| be [=get navigables by ids=] with |input context ids|.
1986-
1987-
1. If [=list/size=] of |navigables| does not equal [=list/size=] of |input context ids|:
1988-
1989-
1. Return [=error=] with [=error code=] [=invalid argument=].
2001+
1. Let |navigables| be the result of [=trying=] to [=get valid navigables by ids=] with |input context ids|.
19902002

19912003
1. Set |subscription navigables| be [=get top-level traversables=] with |navigables|.
19922004

@@ -2102,11 +2114,7 @@ The [=remote end steps=] with |session| and |command parameters| are:
21022114

21032115
1. If |input context ids| is not empty:
21042116

2105-
1. Let |navigables| be [=get navigables by ids=] with |input context ids|.
2106-
2107-
1. If [=list/size=] of |navigables| does not equal [=list/size=] of |input context ids|:
2108-
2109-
1. Return [=error=] with [=error code=] [=invalid argument=].
2117+
1. Let |navigables| be the result of [=trying=] to [=get valid navigables by ids=] with |input context ids|.
21102118

21112119
1. Set |top-level traversables| be [=get top-level traversables=] with |navigables|.
21122120

0 commit comments

Comments
 (0)