Re: [screen-wake-lock] An element attribute proposal for increasing screen brightness (#348)

> Sure, so if we know that screen brightness increased automatically, then we know that it is not necessary to provide extra guidance on how to increase brightness if an attempt fails.
> 
> On the other hand, if we know the element didn't have increased brightness, and the attempt fails for the user, we could offer some instruction on how to do this.

That's an issue with the current proposal indeed. 

I'm not sure how to address this properly. Firing a single generic JS event (e.g. `window.onbrightnessincreased`) or a CSS media query (.e.g `@media increased-brightness`) would not help that much. Web developers don't know currently when the "increase brightness" request is fired. Using timers and/or IntersectionObserver is not great either as it depends on browsers behavior.

Thinking out loud, shall we have several JS events?
- `window.screen.onbrightnessincrease` when the request to increase screen brightness is about to start
- `window.screen.onbrightnessincreasedone` when the screen brightness has been increased by the element attribute
- `window.screen.onbrightnessincreaseerror` when the browser doesn't allow the element to increase screen brightness.
  

-- 
GitHub Notification of comment by beaufortfrancois
Please view or discuss this issue at https://github.com/w3c/screen-wake-lock/issues/348#issuecomment-1263356148 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 30 September 2022 09:49:41 UTC