[csswg-drafts] Pull Request: [css-contain-2] Improve definition of contentvisibilityautostatechange event

tidoust has just submitted a new pull request for https://github.com/w3c/csswg-drafts:

== [css-contain-2] Improve definition of contentvisibilityautostatechange event ==
A [recent commit](https://github.com/w3c/csswg-drafts/commit/c3d88b28e594a665aca14b6a8fea7014e8dd8430) improved the definition of the event somehow but the link between the `contentvisibilityautostatechanged` event and the `ContentVisibilityAutoStateChanged` is not specified anywhere. This update switches to the usual phrasing used across specs for firing events to make the link between the event type and the interface explicit.

Also, Apart from a few exceptions in old specs, events are always named with verbs in the present tense. Accordingly, this update switches the event type to `contentvisibilityautostatechange` instead of `contentvisibilityautostatechanged` and also renames the IDL interfaces. For what it's worth, this guidance does not yet appear in the TAG's API design principles but is considered for inclusion in https://github.com/w3ctag/design-principles/issues/280

This partially addresses concerns raised in #7603. The spec would still need to define an `oncontentvisibilityautostatechange` event handler IDL attribute, which could perhaps be done by extending the `GlobalEventHandlers` mixin (to target `HTMLElement`, `MathMLElement` and `SVGElement` all at once) or by working with the WHATWG to integrate the change in HTML directly.


See https://github.com/w3c/csswg-drafts/pull/7740


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

Received on Wednesday, 14 September 2022 08:16:16 UTC