News for hackers. Stuff that matters.
Re:This page knows your battery charge level (unless you're ... by jakub_g on Saturday November 25, 2023 @05:31PM (#38417356)
The API is only supported in Chromium browsers [0]. It was removed from Firefox and Safari.

https://developer.mozilla.org/en-US/docs/Web/API/Battery_Sta...

Re:This page knows your battery charge level (unless you're ... by zimpenfish on Saturday November 25, 2023 @05:40PM (#38417418)
Somewhat disappointed in macOS for giving the information to Chrome. I'd figure that to be the kind of sensor you need a special entitlement to read (but it may well be tricky to enforce.)
Re:This page knows your battery charge level (unless you're ... by internetter on Saturday November 25, 2023 @05:44PM (#38417440)
Some browsers activate a low power mode when your battery reaches a certain threshold
Re:This page knows your battery charge level (unless you're ... by zimpenfish on Sunday November 26, 2023 @09:06AM (#38421679)
That should probably come from the OS as a power management event ("low power mode: on") rather than the browser being able to read the battery state directly and making its own decisions, surely.
Re:This page knows your battery charge level (unless you're ... by internetter on Tuesday November 28, 2023 @10:47AM (#38446953)
Probably, yeah