Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editorial: Modernize the section covering Navigator.getBattery(). #45

Conversation

rakuco
Copy link
Member

@rakuco rakuco commented Aug 27, 2021

Replace most of the prose with internal slots and reference more terms in
the getBattery() algorithm.

The idea was to adopt more modern spec writing practices and make the text
stricter, but make no user-visible changes. This includes preserving some
oddities in the spec, such as always returning the same promise in
getBattery().


Preview | Diff

index.html Outdated Show resolved Hide resolved
Replace most of the prose with internal slots and reference more terms in
the `getBattery()` algorithm.

The idea was to adopt more modern spec writing practices and make the text
stricter, but make no user-visible changes. This includes preserving some
oddities in the spec, such as always returning the same promise in
`getBattery()`.
@rakuco rakuco force-pushed the editorial/modernize-and-be-stricter-with-navigator-extension branch from e8460c4 to 08fad35 Compare August 28, 2021 17:19
@rakuco
Copy link
Member Author

rakuco commented Aug 31, 2021

I don't have write access to this repository; could either you or @anssiko merge this one?

@rakuco
Copy link
Member Author

rakuco commented Aug 31, 2021

(and thanks for reviewing!)

@reillyeon reillyeon merged commit eb5b629 into w3c:gh-pages Aug 31, 2021
@rakuco rakuco deleted the editorial/modernize-and-be-stricter-with-navigator-extension branch August 31, 2021 20:58
rakuco added a commit to rakuco/battery that referenced this pull request Sep 1, 2021
Similar to w3c#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.
rakuco added a commit to rakuco/battery that referenced this pull request Sep 1, 2021
Similarly to w3c#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.
rakuco added a commit to rakuco/battery that referenced this pull request Sep 1, 2021
Similarly to w3c#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.
rakuco added a commit to rakuco/battery that referenced this pull request Sep 2, 2021
Similarly to w3c#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.
marcoscaceres pushed a commit that referenced this pull request Sep 13, 2021
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants