- From: Moonchild via GitHub <sysbot+gh@w3.org>
- Date: Wed, 12 Mar 2025 14:24:08 +0000
- To: public-css-archive@w3.org
wolfbeast has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-syntax] Syntax document rewrite undid (parts of) #132 == While investigating the standards documents for function parsing, I found that the TR document for css-syntax-3 has parse errors for unexpected EOF tokens, while the draft version does not. This was apparently changed in [6ab5888] without any reasonable explanation, and it effectively undoes #132 for this part of the spec at least. Also, there is conflicting information here: a missing closing parenthesis for a function is, according to the spec, not optional (and hasn't been at least since 2011, I didn't check further back) and should throw a syntax error, while an EOF says to throw a parse error and still return the function. It makes no sense to silently accept this kind of error for a function, especially if the standard explicitly says to throw. At the moment, our engine does throw (a syntaxerror) as indicated by the spec, when a closing parenthesis is omitted e.g. in a `querySelectsAll` JS call, but with this change it would also be instructed to silently ignore it, promoting non-standard coding practices. It would serve everyone (browser vendors, webmasters, etc.) for this standard to be clear what to do with obviously incomplete functions, and at the very least preserve the parse error on unexpected EOF. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11923 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 12 March 2025 14:24:09 UTC