- From: Claudia Meadows via GitHub <noreply@w3.org>
- Date: Tue, 08 Jul 2025 14:17:26 +0000
- To: public-css-archive@w3.org
dead-claudia has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-display-3] `display: unload` to observably unload element state == The idea is this: it renders like `display: none`, but further unloads state to save on memory. I'm filing this here, but it also would require significant changes to the HTML spec. - Images and iframes are unloaded. Transitioning back to any other `display` value causes fetches to happen anew like it was just added, firing an additional `load` event once (re)loaded. - Animations are cut off by `display: unload` and reset upon `display` changing back to something other than `unload`. - Inputs' state resets upon `display` changing to `unload`. - Audio and video play state resets upon `display` changing to `unload`. - Focus removal occurs upon `display` changing to `unload` in the same way they fire on element removal. - Custom elements can observe changes via `.attachedCallback()` and `.detachedCallback()`. `.connectedCallback()` and `.disconnectedCallback()` would default to these if missing. - Probably other stuff I may be missing. The idea is to unload external state for things like inactive popovers, inactive tabs, and inactive routes (see https://github.com/WICG/declarative-partial-updates/issues/14). It does *not* cause elements to be actually removed unless observing JS callbacks do so explicitly, but it has most of the observable side effects that element removal has. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12462 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 8 July 2025 14:17:27 UTC