-
Notifications
You must be signed in to change notification settings - Fork 15
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 and replace prose with algorithms in BatteryManager #46
editorial: Modernize and replace prose with algorithms in BatteryManager #46
Conversation
@reillyeon @marcoscaceres |
df61e14
to
7cbd8d2
Compare
Will try to review soon! |
I authorize @reillyeon to merge this PR once we get @marcoscaceres's eyeballs on it. |
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.
7cbd8d2
to
79ec094
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good @rakuco! Just some suggestions, but a vast improvement! keep it up!
The contents are essentially the same as the normative descriptions in the subsequent section.
Refer to the Web IDL interface rather than the BatteryManager concept.
thanks for reviewing, @reillyeon and @marcoscaceres I'd appreciate it if someone could merge this PR |
Thanks @rakuco! You should add yourself to the editors if you plan to keep an eye on this spec. Otherwise, we’ll give you huge credits in the ack section for these modernizations. |
So far I've just been trying to catch up with the backlog of things I'd promised to do back in April during the DAS WG virtual meeting :-) Once I finish making the spec look better (and hopefully address #15) I can consider officially becoming an editor. |
Similarly to #45, make the
BatteryManager
section more conformant tomodern spec writing practices, while avoiding making user-visible changes as
much as possible:
more specific and recent "queue a global task" algorithm.
slots rather than defining logic in their getters.
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.
Preview | Diff