Re: [csswg-drafts] `:predefined` pseudo-class for built-ins (i.e. not custom elements) (#11001)

> Something in this area would be a nice win. Whether `el.match(`:not(:predefined)`)` were able to be faster than `!customElements.getName(el)` would be an interesting bake-off.
> 
> Small bit of bikeshedding: `:predefined` feels "time relative" to `:defined`. It also sounds like it leans closer to the needs outlined in [whatwg/html#6231](https://github.com/whatwg/html/issues/6231) when you say it to many times.

FWIW, `!customElements.getName(ctor)` and `:not(:predefined)` aren't equivalent.

`:not(:predefined)` is more like `:not(textarea, input, h1, h2, h3) {}` whereas `customElements.getName(ctor)` checks for the element in the custom registry which may return false if the custom element is presentational only and never defines itself in the registry.

-- 
GitHub Notification of comment by KonnorRogers
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11001#issuecomment-2452658098 using your GitHub account


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

Received on Friday, 1 November 2024 22:11:42 UTC