-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add oncontentvisibilityautostatechange #10364
base: main
Are you sure you want to change the base?
Conversation
/cc @Loirooriol |
Blink only seems to implement the IDL attribute, not the content attribute. Gecko doesn't seem to implement either.
These tests don't seem to cover oncontentvisibilityautostatechange as an IDL or content attribute. |
I landed some changes to https://wpt.fyi/results/css/css-contain/content-visibility/content-visibility-auto-state-changed.html?label=master&label=experimental&aligned&q=content-visibility-auto-state to use the IDL and content attribute
I meant the ContentVisibilityAutoState change event, but I can see how the intent of the question is specific to the spec change, not to the feature that has these attributes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine if we want to keep doing on*
attributes? I always found them a bit of an antipattern. Have we done this for other recent events?
It's part of the design principles right now: https://w3ctag.github.io/design-principles/#always-add-event-handlers so I figured it's still a pattern that we encourage. If that's not the case, then we should probably change the design principles and figure out if anything needs to be done with the existing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, we don't want to remove this useful functionality for new events :)
@@ -142156,6 +142165,14 @@ INSERT INTERFACES HERE | |||
<td> <code>SharedWorkerGlobalScope</code> | |||
<td> Fired at a shared worker's global scope when a new client connects | |||
|
|||
<tr> <!-- contentvisibilityautostatechange --> | |||
<td> <dfn event for="HTMLElement"><code data-x="event-contentvisibilityautostatechange">contentvisibilityautostatechange</code></dfn> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So actually we should remove this:
-
https://drafts.csswg.org/css-contain-2/#eventdef-element-contentvisibilityautostatechange already defines the event; we shouldn't have multiple such
<dfn>
s in the ecosystem. -
The table says "The following table lists events fired by this document, excluding those already defined in media element events and drag-and-drop events.". I'm not sure this is followed perfectly, but we should probably follow it.
This means we'll add an xref to the definitions section pointing to https://drafts.csswg.org/css-contain-2/#eventdef-element-contentvisibilityautostatechange .
Spec PR: whatwg/html#10364 Differential Revision: https://phabricator.services.mozilla.com/D217187 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1898833 gecko-commit: e2635b8bf747fe8542ea4442db5aca85bd94eb1b gecko-reviewers: emilio, smaug
Spec PR: whatwg/html#10364 Differential Revision: https://phabricator.services.mozilla.com/D217187 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1898833 gecko-commit: 5d51dcf32767e574e601fca39239fb7c98ff1758 gecko-reviewers: emilio, smaug
Spec PR: whatwg/html#10364 Differential Revision: https://phabricator.services.mozilla.com/D217187 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1898833 gecko-commit: d583d9d438eafe5bec7db0a922ef416dae1bdb79 gecko-reviewers: emilio, smaug
…r r=emilio,smaug Spec PR: whatwg/html#10364 Differential Revision: https://phabricator.services.mozilla.com/D217187
…r r=emilio,smaug Spec PR: whatwg/html#10364 Differential Revision: https://phabricator.services.mozilla.com/D217187
…r r=emilio,smaug Spec PR: whatwg/html#10364 Differential Revision: https://phabricator.services.mozilla.com/D217187
Spec PR: whatwg/html#10364 Differential Revision: https://phabricator.services.mozilla.com/D217187 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1898833 gecko-commit: d583d9d438eafe5bec7db0a922ef416dae1bdb79 gecko-reviewers: emilio, smaug
…r r=emilio,smaug Spec PR: whatwg/html#10364 Differential Revision: https://phabricator.services.mozilla.com/D217187
…r r=emilio,smaug Spec PR: whatwg/html#10364 Differential Revision: https://phabricator.services.mozilla.com/D217187
…r r=emilio,smaug Spec PR: whatwg/html#10364 Differential Revision: https://phabricator.services.mozilla.com/D217187
The contentvisibilityautostatechange event was added in CSSWG:
https://www.w3.org/TR/css-contain-2/#content-visibility-auto-state-changed
An issue was raised that rightly points out that oncontentvisibilityautostatechange should also be added in line with design principles
This PR does this.
(See WHATWG Working Mode: Changes for more details.)
/dom.html ( diff )
/indices.html ( diff )
/webappapis.html ( diff )