diff --git a/index.html b/index.html index b08b03c..f0a6a99 100644 --- a/index.html +++ b/index.html @@ -183,7 +183,7 @@ .mdn .samsunginternet_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/samsung-internet/samsung-internet.svg)} .mdn .webview_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/android-webview/android-webview.png)} - +
@@ -270,7 +270,7 @@

Permissions

Interacting with Permissions for Powerful Features

-

W3C Editor's Draft

+

W3C Editor's Draft

More details about this document
@@ -646,7 +646,7 @@

Permissions

Note: What constitutes an implicit signal?

- A default powerful feature is a powerful feature with all + A default powerful feature is a powerful feature with all of the above types and algorithms defaulted.

@@ -1127,7 +1121,7 @@

Permissions

A descriptor's permission state, given an optional - environment settings object settings is the result of the following algorithm. + environment settings object settings is the result of the following algorithm. It returns a PermissionState enum value:

    @@ -1142,7 +1136,7 @@

    Permissions

  1. Let document be settings' relevant global object's associated Document.
  2. -
  3. If document is not allowed to use feature, return +
  4. If document is not allowed to use feature, return "denied".
@@ -1160,8 +1154,7 @@

Permissions

- As a shorthand, a DOMString name's permission state is the permission - state of a PermissionDescriptor with its name member set + As a shorthand, a DOMString name's permission state is the permission state of a PermissionDescriptor with its name member set to name.

@@ -1175,17 +1168,17 @@

Permissions

granted" or "denied".

    -
  1. Let current state be the descriptor's permission state. +
  2. Let current state be the descriptor's permission state.
  3. If current state is not "prompt", return current state and abort these steps.
  4. -
  5. Ask the user for express permission for the calling algorithm to use the - powerful feature described by descriptor. +
  6. Ask the user for express permission for the calling algorithm to use the + powerful feature described by descriptor.
  7. If the user gives express permission to use the powerful feature, set current state to "granted"; otherwise to "denied". The - user's interaction may provide new information about the user's intent for the + user's interaction may provide new information about the user's intent for the origin.
    Note

    This is intentionally vague about the details of the permission UI and how the user @@ -1202,8 +1195,8 @@

    Permissions

- As a shorthand, requesting permission to use a DOMString name, is the same - as requesting permission to use a PermissionDescriptor with its + As a shorthand, requesting permission to use a DOMString name, is the same + as requesting permission to use a PermissionDescriptor with its name member set to name.

@@ -1213,20 +1206,20 @@

Permissions

To prompt the user to choose one or more options associated with a given - descriptor and an optional boolean allowMultiple + descriptor and an optional boolean allowMultiple (default false), the user agent must perform the following steps. This algorithm returns either "denied" or the user's selection.

    -
  1. If descriptor's permission state is "denied", return +
  2. If descriptor's permission state is "denied", return "denied" and abort these steps.
  3. -
  4. If descriptor's permission state is "granted", the user +
  5. If descriptor's permission state is "granted", the user agent may return one (or more if allowMultiple is true) of options chosen by the user and abort these steps. If the user agent returns without prompting, then subsequent prompts for the user to choose from the same set of options with the same descriptor must return the same option(s), unless the user - agent receives new information about the user's intent. + agent receives new information about the user's intent.
  6. Ask the user to choose one or more options or deny permission, and wait for them to choose: @@ -1249,8 +1242,8 @@

    Permissions

- As a shorthand, prompting the user to choose from options associated with a - DOMString name, is the same as prompting the user to choose from those + As a shorthand, prompting the user to choose from options associated with a + DOMString name, is the same as prompting the user to choose from those options associated with a PermissionDescriptor with its name member set to name.

@@ -1480,24 +1473,22 @@

Permissions

- When the query() method is invoked, the user agent MUST run the + When the query() method is invoked, the user agent MUST run the following query a permission algorithm, passing the parameter permissionDesc:

  1. If this's relevant global object is a Window object, then:
      -
    1. If the current settings object's associated Document is not +
    2. If the current settings object's associated Document is not fully active, return a promise rejected with an "InvalidStateError" DOMException.
  2. -
  3. Let rootDesc be the object permissionDesc refers to, converted to an IDL - value of type PermissionDescriptor. +
  4. Let rootDesc be the object permissionDesc refers to, converted to an IDL value of type PermissionDescriptor.
  5. -
  6. If the conversion throws an exception, return a promise - rejected with that exception. +
  7. If the conversion throws an exception, return a promise rejected with that exception.
  8. If rootDesc["name"] is not supported, return a promise rejected with a TypeError.
    Note: Why is this not an enum?
  9. -
  10. Let typedDescriptor be the object permissionDesc refers to, converted to an - IDL value of rootDesc's name's permission descriptor type. +
  11. Let typedDescriptor be the object permissionDesc refers to, converted to an IDL value of rootDesc's name's permission descriptor type.
  12. -
  13. If the conversion throws an exception, return a promise - rejected with that exception. +
  14. If the conversion throws an exception, return a promise rejected with that exception.
  15. Let promise be a new promise.
  16. Return promise and continue in parallel:
      -
    1. Let status be create a PermissionStatus with typedDescriptor. +
    2. Let status be create a PermissionStatus with typedDescriptor.
    3. Let query be status's [[query]] internal slot.
    4. @@ -1780,8 +1769,8 @@

      Permissions

      - The onchange attribute is an event handler whose corresponding - event handler event type is change. + The onchange attribute is an event handler whose corresponding + event handler event type is change.

      Whenever the user agent is aware that the state of a PermissionStatus instance @@ -1803,7 +1792,7 @@

      Permissions

      Run query's name's permission query algorithm, passing query and status.
    5. - Queue a task on the permissions task source to fire an event named + Queue a task on the permissions task source to fire an event named change at status.
    @@ -1876,8 +1865,8 @@

    Permissions

    For the purposes of user-agent automation and application testing, this document defines - the following extension commands for the [WebDriver] specification. It is OPTIONAL - for a user agent to support extension commands commands. + the following extension commands for the [WebDriver] specification. It is OPTIONAL + for a user agent to support extension commands commands.

    WebIDLdictionary PermissionSetParameters {
       required PermissionDescriptor descriptor;
    @@ -1909,46 +1898,44 @@ 

    Permissions

    The Set Permission - extension command simulates user modification of a PermissionDescriptor's - permission state. + extension command simulates user modification of a PermissionDescriptor's + permission state.

    - The remote end steps are: + The remote end steps are:

      -
    1. Let parameters be the parameters argument, converted to an IDL value of +
    2. Let parameters be the parameters argument, converted to an IDL value of type PermissionSetParameters. If this throws an exception, return an invalid argument error.
    3. Let rootDesc be parameters.descriptor.
    4. -
    5. Let typedDescriptor be the object rootDesc refers to, converted to an IDL - value of rootDesc.name's permission descriptor type. If this throws an exception, return a invalid argument error. +
    6. Let typedDescriptor be the object rootDesc refers to, converted to an IDL value of rootDesc.name's permission descriptor type. If this throws an exception, return a invalid argument error.
    7. -
    8. If parameters.state is an inappropriate permission - state for any implementation-defined reason, return a invalid argument error. +
    9. If parameters.state is an inappropriate permission state for any implementation-defined reason, return a invalid argument error.
      Note

      - For example, user agents that define the "midi" powerful feature as - "always on" may choose to reject a command to set the permission state to + For example, user agents that define the "midi" powerful feature as + "always on" may choose to reject a command to set the permission state to "denied" at this step.

    10. Let settings be the current settings object.
    11. -
    12. Let targets be a list containing all environment settings objects +
    13. Let targets be a list containing all environment settings objects whose origin is the same as the origin of settings.
    14. -
    15. Let tasks be an empty list. +
    16. Let tasks be an empty list.
    17. -
    18. For each environment settings object target in targets: +
    19. For each environment settings object target in targets:
      1. - Queue a task task on the permissions task source of target's + Queue a task task on the permissions task source of target's relevant settings object's global object's browsing context to perform the following step:
        1. Interpret parameters.state as if it were the - result of an invocation of permission state for typedDescriptor with the + result of an invocation of permission state for typedDescriptor with the argument target made at this moment.
        @@ -1957,9 +1944,9 @@

        Permissions

    20. -
    21. Wait for all tasks in tasks to have executed. +
    22. Wait for all tasks in tasks to have executed.
    23. -
    24. Return success with data null. +
    25. Return success with data null.