w3c / window-management

Window Management API
https://www.w3.org/TR/window-management/
Other
96 stars 25 forks source link

screenschange is easy to mistake for screenchange #12

Closed kenchris closed 2 years ago

kenchris commented 4 years ago

I would suggest something like screenavailabilitychange or similar

michaelwasserman commented 4 years ago

Is screenchange an existing name for something else, or are you mainly concerned about typos between the plural and singular when specifying the proposed screenschange event from the Screen Enumeration proposal?

I appreciate advice naming the event, but 'availability' might not readily convey that this event would be fired on screen additions/removals and screen property changes (eg. colorDepth). It's certainly worthwhile to explore names further, and maybe even consider separate events for additions, removals, and property changes. I'll attempt to describe this issue in more detail with alternative names and examples soon.

tomayac commented 3 years ago

I made this mistake, too, when I tested the API for the very first time. In the article, I have highlighted that it's the plural form.

michaelwasserman commented 2 years ago

I recognize that the plurality is subtle, but the event screenschange fires when a screen is added to or removed from the screens array in the same interface.

There is also a currentscreenchange event that fires when the currentScreen attribute changes, and the Screen interface change event fires when the per-screen attributes change.

I think this naming scheme is coherent and sufficient. Please reopen this issue if there's any new feedback to consider.