Re: [w3ctag/design-reviews] HTMLScriptElement.supports(type) method (#674)

For the reason I stated, as a general purpose supports mechanism, similar to `CSS.supports()` where results would be dependent on the element class, so a `HTML.supports()` wouldn't be appropriate.

Note that I'm not trying to design new features here, @atanassov and I are just asking the question "are there potential uses of a  generic `supports()` method that have a different scope and may collide with this one", and I think the answer is, yes.

The bottom line is that while we can spend all day imagining (or denying) future uses, we just can't know what the future will bring. In general, using narrowly scoped features allows more flexibility down the road. If the goal here is brevity, I don't think saving 4 characters is worth the risk of future naming collisions which could lead to author confusion.

If your concern is more about being consistent with `DOMTokenList.supports()`, then that argues more for `HTMLScriptElement.type.supports()` than it does for `HTMLScriptElement.supports()`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/674#issuecomment-920170706

Received on Wednesday, 15 September 2021 16:26:03 UTC