Skip to content

Commit

Permalink
editorial: Use Web IDL's definition conventions for methods and gette…
Browse files Browse the repository at this point in the history
…rs. (#49)

Aligns with whatwg/webidl#882:
- Describe getters as "The attr getter steps are [...]".
- Describe methods as "The myMethod(arg) method steps are [...]".
  • Loading branch information
rakuco authored Nov 5, 2021
1 parent 4291db6 commit d43d6bb
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ <h3>
</h3>
<p data-tests=
"battery-promise-window.https.html, battery-promise.https.html">
The <dfn>getBattery()</dfn> method, when invoked, MUST run the
following steps:
The <dfn>getBattery()</dfn> method steps are:
</p>
<ol class="algorithm">
<li>If [=this=].{{Navigator/[[BatteryPromise]]}} is `null`, then set
Expand Down Expand Up @@ -430,35 +429,35 @@ <h3>
The `charging` attribute
</h3>
<p>
The <dfn>charging</dfn> attribute's getter returns the value of the
{{BatteryManager/[[Charging]]}} internal slot.
The <dfn>charging</dfn> getter steps are to return
[=this=].{{BatteryManager/[[Charging]]}}.
</p>
</section>
<section>
<h3>
The `chargingTime` attribute
</h3>
<p>
The <dfn>chargingTime</dfn> attribute's getter returns the value of
the {{BatteryManager/[[ChargingTime]]}} internal slot.
The <dfn>chargingTime</dfn> getter steps are to return
[=this=].{{BatteryManager/[[ChargingTime]]}}.
</p>
</section>
<section>
<h3>
The `dischargingTime` attribute
</h3>
<p>
The <dfn>dischargingTime</dfn> attribute's getter returns the value
of the {{BatteryManager/[[DischargingTime]]}} internal slot.
The <dfn>dischargingTime</dfn> getter steps are to return
[=this=].{{BatteryManager/[[DischargingTime]]}}.
</p>
</section>
<section>
<h3>
The `level` attribute
</h3>
<p>
The <dfn>level</dfn> attribute's getter returns the value of the
{{BatteryManager/[[Level]]}} internal slot.
The <dfn>level</dfn> getter steps are to return
[=this=].{{BatteryManager/[[Level]]}}.
</p>
</section>
<section>
Expand Down

0 comments on commit d43d6bb

Please sign in to comment.