Re: [csswg-drafts] [css-conditional-4][selectors-4] How should selector supports test react to partially-implemented selectors? (#3936)

I believe that "optional" shouldn't mean anything more than "up to the implementer". If somebody who (against all reason) implements this selector for scripting only decides to make this check return true, let it be so. If they prefer to return false for the sake of consistency with CSS, let them do so.

Anyways, I'd wager that this would stay a purely theoretical issue for a very long time because in reality 99% of JS developers would never use this check at all, simply switching from the conditional exotic selector one-liner to the unconditional two-liners proven to work everywhere (not to mention that direct DOM traversal is much less used at all in modern JS than it was in the jQuery era). This would likely lead to the same "no one implemented → no one uses → no one asks for → no one wants to implement" deadlock that I believe we have actually observed in reality since the `:has()` proposal exists (given the fact that the only context it has been implemented in was _styling_ rather than scripting!).

Please, don't bring back the concept of "snapshot profile" in any form! Disabling _CSS_ selectors for styling is exactly as efficient solution to the performance problem as not introducing them at all. Let's try to find better solutions to the performance problem first. As a starting point for brainstorming: maybe restricting the scope of `:has()` with something similar to XSLT axes would help?..

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

Received on Thursday, 16 May 2019 10:29:13 UTC