Skip to content

Commit

Permalink
chore(tidy): tidy up document (#429)
Browse files Browse the repository at this point in the history
Co-authored-by: miketaylr <[email protected]>
  • Loading branch information
github-actions[bot] and miketaylr authored Nov 22, 2023
1 parent 7a1a9f1 commit d9f7eda
Showing 1 changed file with 34 additions and 36 deletions.
70 changes: 34 additions & 36 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ <h2>
"powerful feature">name</dfn>, which is a string literal (e.g., "geolocation").
</p>
<p>
The user agent tracks which [=powerful features=] the user has [=permission=] to use
via the [=environment settings object=].
The user agent tracks which [=powerful features=] the user has [=permission=] to use via
the [=environment settings object=].
</p>
<section>
<h3>
Expand Down Expand Up @@ -499,9 +499,9 @@ <h2>
instances. If |descriptorA| is <dfn class="export" data-dfn-for=
"PermissionDescriptor">stronger than</dfn> |descriptorB|, then if |descriptorA|'s
[=permission state=] is {{PermissionState/"granted"}}, |descriptorB|'s [=permission
state=] must also be {{PermissionState/"granted"}}, and if |descriptorB|'s
[=permission state=] is {{PermissionState/"denied"}}, |descriptorA|'s [=permission
state=] must also be {{PermissionState/"denied"}}.
state=] must also be {{PermissionState/"granted"}}, and if |descriptorB|'s [=permission
state=] is {{PermissionState/"denied"}}, |descriptorA|'s [=permission state=] must also
be {{PermissionState/"denied"}}.
</p>
<aside class="example" id="example-stronger-than" title=
"A permission descriptor that defines a partial order">
Expand Down Expand Up @@ -729,8 +729,8 @@ <h2>
</dd>
</dl>
<p>
A <dfn class="export">default powerful feature</dfn> is a [=powerful feature=] with all
of the above types and algorithms defaulted.
A <dfn class="export">default powerful feature</dfn> is a [=powerful feature=] with all of
the above types and algorithms defaulted.
</p>
</section>
<section>
Expand All @@ -756,8 +756,8 @@ <h3 id="reading-current-states">
</ol>
<p>
A |descriptor|'s <dfn class="export">permission state</dfn>, given an optional
[=environment settings object=] |settings| is the result of the following algorithm.
It returns a {{PermissionState}} enum value:
[=environment settings object=] |settings| is the result of the following algorithm. It
returns a {{PermissionState}} enum value:
</p>
<ol class="algorithm">
<li>If |settings| wasn't passed, set it to the [=current settings object=].
Expand Down Expand Up @@ -792,9 +792,9 @@ <h3 id="reading-current-states">
</li>
</ol>
<p>
As a shorthand, a {{DOMString}} |name|'s [=permission state=] is the [=permission
state=] of a {{PermissionDescriptor}} with its {{PermissionDescriptor/name}} member set
to |name|.
As a shorthand, a {{DOMString}} |name|'s [=permission state=] is the [=permission state=]
of a {{PermissionDescriptor}} with its {{PermissionDescriptor/name}} member set to
|name|.
</p>
</section>
<section>
Expand Down Expand Up @@ -837,8 +837,8 @@ <h3 id="requesting-more-permission">
</li>
</ol>
<p>
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
{{PermissionDescriptor/name}} member set to |name|.
</p>
</section>
Expand Down Expand Up @@ -886,9 +886,9 @@ <h3>
</ol>
<p>
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 {{PermissionDescriptor/name}}
member set to |name|.
{{DOMString}} |name|, is the same as [=prompting the user to choose=] from those options
associated with a {{PermissionDescriptor}} with its {{PermissionDescriptor/name}} member
set to |name|.
</p>
</section>
<section>
Expand Down Expand Up @@ -1083,8 +1083,8 @@ <h4>
`onchange` attribute
</h4>
<p>
The <dfn>onchange</dfn> attribute is an [=event handler=] whose corresponding
[=event handler event type=] is <code>change</code>.
The <dfn>onchange</dfn> attribute is an [=event handler=] whose corresponding [=event
handler event type=] is <code>change</code>.
</p>
<p id="PermissionStatus-update">
Whenever the [=user agent=] is aware that the state of a {{PermissionStatus}} instance
Expand All @@ -1107,9 +1107,8 @@ <h4>
<li>Run |query|'s {{PermissionDescriptor/name}}'s [=powerful feature/permission query
algorithm=], passing |query| and |status|.
</li>
<li>
[=Queue a task=] on the [=permissions task source=] to [=fire an event=] named
<code>change</code> at |status|.
<li>[=Queue a task=] on the [=permissions task source=] to [=fire an event=] named
<code>change</code> at |status|.
</li>
</ol>
</section>
Expand Down Expand Up @@ -1221,9 +1220,9 @@ <h3 id="set-permission-command">
The [=remote end steps=] are:
</p>
<ol>
<li>Let |parameters| be the |parameters| argument, [=converted to an IDL value=] of
type {{PermissionSetParameters}}. If this throws an exception, return an [=invalid
argument=] [=error=].
<li>Let |parameters| be the |parameters| argument, [=converted to an IDL value=] of type
{{PermissionSetParameters}}. If this throws an exception, return an [=invalid argument=]
[=error=].
</li>
<li>Let |rootDesc| be |parameters|.{{PermissionSetParameters/descriptor}}.
</li>
Expand All @@ -1235,25 +1234,24 @@ <h3 id="set-permission-command">
<li>If |parameters|.{{PermissionSetParameters/state}} is an inappropriate [=permission
state=] for any implementation-defined reason, return a [=invalid argument=] [=error=].
<p class="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
{{PermissionState/"denied"}} at this step.
</p>
</li>
<li>Let |settings| be the [=current settings object=].
</li>
<li>Let |targets| be a [=list=] containing all [=environment settings objects=]
whose [=environment settings object/origin=] is the <a data-lt="same origin">same</a> as
the [=environment settings object/origin=] of |settings|.
<li>Let |targets| be a [=list=] containing all [=environment settings objects=] whose
[=environment settings object/origin=] is the <a data-lt="same origin">same</a> as the
[=environment settings object/origin=] of |settings|.
</li>
<li>Let |tasks| be an empty [=list=].
</li>
<li>For each [=environment settings object=] |target| in |targets|:
<ol>
<li>
[=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:
<li>[=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:
<ol>
<li>Interpret |parameters|.{{PermissionSetParameters/state}} as if it were the
result of an invocation of [=permission state=] for |typedDescriptor| with the
Expand All @@ -1273,8 +1271,8 @@ <h3 id="set-permission-command">
<aside class="example" title="Setting a permission via WebDriver">
<p>
To [=extension commands/set permission=] for `{name: "midi", sysex: true}` of the
[=current settings object=] of the [=session=] with ID 23 to "`granted`", the local
end would POST to `/session/23/permissions` with the body:
[=current settings object=] of the [=session=] with ID 23 to "`granted`", the local end
would POST to `/session/23/permissions` with the body:
</p>
<pre class="lang-json">
{
Expand Down

0 comments on commit d9f7eda

Please sign in to comment.