Skip to content

Commit

Permalink
editorial: Modernize and replace prose with algorithms in BatteryMana…
Browse files Browse the repository at this point in the history
…ger (#46)

* editorial: Modernize and replace prose with algorithms in BatteryManager

Similarly to #45, make the `BatteryManager` section more conformant to
modern spec writing practices, while avoiding making user-visible changes as
much as possible:
- Define a task source for this spec, and switch from "queue a task" to the
  more specific and recent "queue a global task" algorithm.
- Replace a lot of prose with internal slots and algorithms.
- Make the interface attributes simply return the values of the internal
  slots rather than defining logic in their getters.
- Define an actual algorithm for updating internal slots and dispatching
  events. The existing prose just said "the UA must change the attribute and
  fire an event" without really defining how to reach a `BatteryManager`
  object in the first place.

* Use [= =] notation in the update battery status and notify algorithm.

* Remove non-normative description of BatteryManager's internal slots.

The contents are essentially the same as the normative descriptions in the
subsequent section.

* Use {{BatteryManager}} to refer to it in the text.

Refer to the Web IDL interface rather than the BatteryManager concept.

* BatteryManager: Define and reference the event types in the Event Handler table.
  • Loading branch information
rakuco committed Sep 13, 2021
1 parent eb5b629 commit 4291db6
Showing 1 changed file with 259 additions and 128 deletions.
Loading

0 comments on commit 4291db6

Please sign in to comment.