diff --git a/index.html b/index.html index 89021fb..b85b1a7 100644 --- a/index.html +++ b/index.html @@ -1299,182 +1299,182 @@
- This document defines the following [=extension modules=] for the [[WebDriver-BiDi]] specification. -
-- The permissions module contains commands for - managing the remote end browser permissions. + This document defines the following [=extension modules=] for the [[WebDriver-BiDi]] specification.
- [=remote end definition=] + The permissions module contains commands for + managing the remote end browser permissions.
-- PermissionsCommand = ( - permissions.setPermission - ) --
- permissions.PermissionDescriptor = { - type: "permissionDescriptor", - name: text, - } -+
- The permissions.PermissionDescriptor
type represents a {{PermissionDescriptor}}.
+ [=remote end definition=]
+ PermissionsCommand = ( + permissions.setPermission + ) +
- permissions.PermissionState = "granted" / "denied" / "prompt" --
- The permissions.PermissionState
type represents a {{PermissionState}}.
-
+ permissions.PermissionDescriptor = { + type: "permissionDescriptor", + name: text, + } ++
+ The permissions.PermissionDescriptor
type represents a {{PermissionDescriptor}}.
+
+ permissions.PermissionState = "granted" / "denied" / "prompt" ++
+ The permissions.PermissionState
type represents a {{PermissionState}}.
+
- The Set Permission - [=extension module=] simulates user modification of a {{PermissionDescriptor}}'s - [=permission state=]. -
-- permissions.setPermission = ( - method: "permissions.setPermission", - params: permissions.SetPermissionParameters - ) ++ Commands +
++ + The permissions.setPermission Command +
++ The Set Permission + [=extension module=] simulates user modification of a {{PermissionDescriptor}}'s + [=permission state=]. +
++
-- Command Type
+- +
-+ permissions.setPermission = ( + method: "permissions.setPermission", + params: permissions.SetPermissionParameters + ) - permissions.SetPermissionParameters = { - descriptor: permissions.PermissionDescriptor, - state: permissions.PermissionState, - ? context: browsingContext.BrowsingContext, - ? origin: text, - } --- Result Type
-- -
-- EmptyResult ---+- The [=remote end steps=] with |session| and |command parameters| are: -
--
- - Let |descriptor| be the value of the
-descriptor
field of - |command parameters|. -- - Let |state| be the value of the
-state
field of |command - parameters|. -- - Let |context id| be the value of the
-context
field of - |command parameters|. -- - If |context id| is not present, let |context| be the [=top-level browsing context=] - of |session|. Otherwise, let |context| be the result of [=trying=] to - [=get a browsing context=] with |context id|. -
-- - Let |permission name| be the value of the
-name
field of - |descriptor| representing {{PermissionDescriptor/name}}. -- - - [=Convert to an IDL value=] (|descriptor|, |state|) of type {{PermissionSetParameters}}. - If this conversion throws an exception, return [=error=] with [=error code=] [=invalid argument=]. -
-- - Let |typedDescriptor| be the object |descriptor| refers to, converted to an IDL - value of |permission name|'s [=powerful - feature/permission descriptor type=]. If this throws an exception, - return [=error=] with [=error code=] [=invalid argument=]. -
-- - If |state| is an inappropriate [=permission state=] for any - implementation-defined reason, return [=error=] with [=error code=] [=invalid argument=]. -
-- - Let |settings| be the [=current settings object=]. -
-- - Let |targets| be a [=/list=] containing all [=environment settings object=] - whose [=environment settings object/origin=] is the same as - the [=environment settings object/origin=] of |settings|. -
-- - Let |tasks| be an empty [=/list=]. -
-- - For each [=environment settings object=] |target| in |targets|: -
--
+ +- - [=Queue a task=] |task| on the [=permissions task source=] of |target|'s - [=relevant settings object=]'s [=environment settings object/global object=]'s - [=Window/browsing context=] to perform the following step: -
+ permissions.SetPermissionParameters = { + descriptor: permissions.PermissionDescriptor, + state: permissions.PermissionState, + ? context: browsingContext.BrowsingContext, + ? origin: text, + } + + +- Result Type
+- +
+ ++ EmptyResult +++++ The [=remote end steps=] with |session| and |command parameters| are: +
++
-- + Let |descriptor| be the value of the
+descriptor
field of + |command parameters|. +- + Let |state| be the value of the
+state
field of |command + parameters|. +- + Let |context id| be the value of the
+context
field of + |command parameters|. +- + If |context id| is not present, let |context| be the [=top-level browsing context=] + of |session|. Otherwise, let |context| be the result of [=trying=] to + [=get a browsing context=] with |context id|. +
+- + Let |permission name| be the value of the
+name
field of + |descriptor| representing {{PermissionDescriptor/name}}. +- + + [=Convert to an IDL value=] (|descriptor|, |state|) of type {{PermissionSetParameters}}. + If this conversion throws an exception, return [=error=] with [=error code=] [=invalid argument=]. +
+- + Let |typedDescriptor| be the object |descriptor| refers to, converted to an IDL + value of |permission name|'s [=powerful + feature/permission descriptor type=]. If this throws an exception, + return [=error=] with [=error code=] [=invalid argument=]. +
+- + If |state| is an inappropriate [=permission state=] for any + implementation-defined reason, return [=error=] with [=error code=] [=invalid argument=]. +
+- + Let |settings| be the [=current settings object=]. +
+- + Let |targets| be a [=/list=] containing all [=environment settings object=] + whose [=environment settings object/origin=] is the same as + the [=environment settings object/origin=] of |settings|. +
+- + Let |tasks| be an empty [=/list=]. +
+- + For each [=environment settings object=] |target| in |targets|: +
-
- - Interpret |state| as if it were the result of an invocation of [=permission state=] - for |typedDescriptor| with the argument |target| made at this moment. + [=Queue a task=] |task| on the [=permissions task source=] of |target|'s + [=relevant settings object=]'s [=environment settings object/global object=]'s + [=Window/browsing context=] to perform the following step: +
++
+- + Interpret |state| as if it were the result of an invocation of [=permission state=] + for |typedDescriptor| with the argument |target| made at this moment. +
+- + [=list/Append=] |task| to |tasks|.
- - [=list/Append=] |task| to |tasks|. -
-- - Wait for all tasks in |tasks| to have executed. -
-- - Return [=success=] with data null. -
- - -- + Wait for all tasks in |tasks| to have executed. +
+- + Return [=success=] with data null. +
+