W3C home > Mailing lists > Public > public-css-archive@w3.org > February 2019

Re: [csswg-drafts] [css-pseudo-4] Should Element.pseudo("unknown") be an error or return null? (#3603)

From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
Date: Mon, 25 Feb 2019 22:19:36 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-467207228-1551133175-sysbot+gh@w3.org>
The CSS Working Group just discussed `unknown pseudo() arg`, and agreed to the following:

* `RESOLVED: Return null provisionally and open a TAG review issue.`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: unknown pseudo() arg<br>
&lt;fantasai> github: https://github.com/w3c/csswg-drafts/issues/3603<br>
&lt;fantasai> TabAtkins: We can either go with JS likes to signal errors for error conditions<br>
&lt;fantasai> TabAtkins: or DOM likes to return nulls<br>
&lt;fantasai> TabAtkins: I believe we should return a null for this object.<br>
&lt;fantasai> TabAtkins: fremy made a good use case for being able to easily test whether a pseudo is supported in an element<br>
&lt;fantasai> TabAtkins: throwing is more verbose in JS<br>
&lt;fantasai> astearns: There's also question of does this element support this pseudo<br>
&lt;fantasai> TabAtkins: https://github.com/w3c/csswg-drafts/issues/3603#issuecomment-463287002<br>
&lt;fantasai> TabAtkins: I think this is fine.<br>
&lt;fantasai> TabAtkins: null will immediately throw an error if  you try to access properties on it, so you'll gt an error if you don't check anyway<br>
&lt;fantasai> TabAtkins: Gives you same behavior in practice, but null gives you a more useful boolean result in practice<br>
&lt;fantasai> myles_: ...<br>
&lt;fantasai> TabAtkins: querySelector throws and it's really annoying<br>
&lt;fantasai> myles_: Just pointing out the fact that it throws<br>
&lt;fantasai> fantasai: If you and fremy agree, seems OK to me<br>
&lt;fantasai> fantasai: We can also ask the TAG if they have an opinion on this<br>
&lt;fantasai> astearns: Not sure it's that important<br>
&lt;bkardell_> +1<br>
&lt;fantasai> fantasai: It's about consistency across the platform. TAG is good for that.<br>
&lt;fantasai> RESOLVED: Return null provisionally and open a TAG review issue.<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3603#issuecomment-467207228 using your GitHub account
Received on Monday, 25 February 2019 22:19:37 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:44 UTC