-
Notifications
You must be signed in to change notification settings - Fork 641
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
[css-scroll-snap-2] snapChanged and snapChanging events are confusing and incomplete #7442
Comments
Adding on that, JS seems to always have used present tense (input events: change, blur), page events (pagehide), window events (resize)... would it be more sense to replace "snapchange" by "snapchanged" ? I agree snapchanged better reflect what it happens, but for consistency reason I think standard events should follow standard casing and naming logic. |
The table seems to use the same structure as in https://html.spec.whatwg.org/multipage/webappapis.html#event-handlers-on-elements%2C-document-objects%2C-and-window-objects but confusingly defines "snapChanged" and "snapChanging" as an event handlers for
It looks like implementation has started in Chromium, so addressing the naming at least would be good. |
The implemented |
Why are new events needed, vs adding the snap information to the existing |
For snapchanging, I'd say I think it's better as a separate event form |
OK, thanks. Since there was a comment about the naming, I'd like to suggest event names that are more consistent with
This would make them appear next to |
I filed this issue so the working group can come to a resolution on the naming at some point. |
Is this resolved now? I think @DavMila articulated why it's useful to have separate events #7442 (comment), we agreed on and updated the names #9697, and the event handlers have been called out in the appendix https://drafts.csswg.org/css-scroll-snap-2/#event-handlers though should be added to the html spec, but it's not uncommon to start in the appendix of the related spec. |
re event handler, I think #10344 still needs consideration - but otherwise, my side of the issue has been addressed |
https://drafts.csswg.org/css-scroll-snap-2/#snap-events seems two describe two new events,
snapChanged
andsnapChanging
.Confusingly, it describes them as "event handler" with an event type of
scroll
, but I'm not sure what this is supposed to mean.This misses an IDL fragment that describes
on…
event handler (presumably on theHTMLElement
interface, but maybeGlobalEventHandlers
if the events are supposed to bubble).The vast majority of event names are purely lowercase, so the event should probably be
snapchanged
andsnapchanging
.The text was updated successfully, but these errors were encountered: