diff --git a/index.bs b/index.bs index be9554468..281d0f2cf 100644 --- a/index.bs +++ b/index.bs @@ -2508,7 +2508,9 @@ The [=remote end steps=] with |session| and |command parameters| are: 1. Run the [=remote end subscribe steps=] for the [=event=] with [=event name=] |event name| given |session|, |contexts| and |include global|. -1. Return [=success=] with data null. +1. Let |body| be a new map. + +1. Return [=success=] with data |body|. @@ -2549,7 +2551,9 @@ The [=remote end steps=] with |session| and |command parameters| are: 1. [=Try=] to [=update the event map=] with |session|, |list of event names|, |list of contexts| and enabled false. -1. Return [=success=] with data null. +1. Let |body| be a new map. + +1. Return [=success=] with data |body|. @@ -3005,6 +3009,10 @@ The [=remote end steps=] with |command parameters| are: 1. [=Close=] |context|. + 1. Let |body| be a new map. + + 1. Return [=success=] with data |body|. + Issue(w3c/webdriver-bidi#170): There is an open discussion about the behavior when closing the last [=top-level browsing context=]. We could expect to close the browser, close the session or leave this up to the implementation. @@ -3225,7 +3233,9 @@ The [=remote end steps=] with session and |command parameters| Otherwise return [=error=] with [=error code=] [=no such alert=]. -1. Return [=success=] with data null. +1. Let |body| be a new map. + +1. Return [=success=] with data |body|. @@ -4481,9 +4491,11 @@ The [=remote end steps=] given |session| and |command parameters| are: 1. Set |preload script map|[|script|] to a struct with expression |expression| and sandbox |sandbox|. -1. Return a new map matching the script.AddPreloadScriptResult with the +1. Let |body| be a new map matching the script.AddPreloadScriptResult with the script field set to |script|. +1. Return [=success=] with data |body|. + #### The script.disown Command #### {#command-script-disown} @@ -4523,6 +4535,10 @@ The [=remote end steps=] with |command parameters| are: 1. If |handle map| contains |handle id|, remove |handle id| from the |handle map|. +1. Let |body| be a new map. + +1. Return [=success=] with data |body|. + #### The script.callFunction Command #### {#command-script-callFunction} @@ -4653,10 +4669,12 @@ The [=remote end steps=] with |command parameters| are: 1. Let |exception details| be the result of [=get exception details=] given |realm|, |function body evaluation status| and |result ownership|. - 1. Return a new map matching the script.EvaluateResultException + 1. Let |body| be a new map matching the script.EvaluateResultException production, with the exceptionDetails field set to |exception details|. + 1. Return [=success=] with data |body|. + 1. Let |function object| be |function body evaluation status|.\[[Value]]. 1. If [=IsCallable=](|function object|) is false: @@ -4681,20 +4699,24 @@ The [=remote end steps=] with |command parameters| are: 1. Let |exception details| be the result of [=get exception details=] given |realm|, |evaluation status| and |result ownership|. - 1. Return a new map matching the script.EvaluateResultException + 1. Let |body| be a new map matching the script.EvaluateResultException production, with the exceptionDetails field set to |exception details|. + 1. Return [=success=] with data |body|. + 1. Assert: |evaluation status|.\[[Type]] is normal. 1. Let |result| be the result of [=serialize as a remote value=] given |evaluation status|.\[[Value]], 1 as |max depth|, |result ownership|, new map as |serialization internal map| and |realm|. -1. Return a new map matching the script.EvaluateResultSuccess +1. Let |body| be a new map matching the script.EvaluateResultSuccess production, with the realm field set to |realm id|, and the result field set to |result|. +1. Return [=success=] with data |body|. + #### The script.evaluate Command #### {#command-script-evaluate} The script.evaluate command evaluates a provided @@ -4777,20 +4799,24 @@ The [=remote end steps=] with |command parameters| are: 1. Let |exception details| be the result of [=get exception details=] given |realm|, |evaluation status| and |result ownership|. - 1. Return a new map matching the script.EvaluateResultException + 1. Let |body| be a new map matching the script.EvaluateResultException production, with the realm field set to |realm id|, and the exceptionDetails field set to |exception details|. + 1. Return [=success=] with data |body|. + 1. Assert: |evaluation status|.\[[Type]] is normal. 1. Let |result| be the result of [=serialize as a remote value=] given |evaluation status|.\[[Value]], 1 as |max depth|, |result ownership|, new map as |serialization internal map| and |realm|. -1. Return a new map matching the script.EvaluateResultSuccess +1. Let |body| be a new map matching the script.EvaluateResultSuccess production, with the with the realm field set to |realm id|, and the result field set to |result|. +1. Return [=success=] with data |body|. + #### The script.getRealms Command #### {#command-script-getRealms} The script.getRealms command returns a list of @@ -4917,7 +4943,9 @@ The [=remote end steps=] given |session| and |command parameters| are: 1. Remove |script| from |preload script map|. -1. Return null +1. Let |body| be a new map. + +1. Return [=success=] with data |body|.