[csswg-drafts] [cssom][web-animation-1] Consistent behavior for invalid pseudos in getComputedStyle/getAnimations (#11081)

vmpstr has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom][web-animation-1] Consistent behavior for invalid pseudos in getComputedStyle/getAnimations ==
We resolved in #9908 to add a pseudo element to getAnimations which shifts the target of the call to the pseudo element instead of the originating element.

In the PR #11050 a question came up of what to do if it's invalid. Other web animation functions throw an exception which is what we added in the PR. Then, checking getComputedStyle [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle#exceptions) says that it throws, but neither @flackr nor I couldn't spot anything in the [spec](https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle) that would say it throws. 

Filing this to resolve on consistent treatment and proposing that we throw a SyntaxError DOMException if the pseudo element is invalid. 

/cc @flackr 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11081 using your GitHub account


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

Received on Thursday, 24 October 2024 14:29:56 UTC