[Bug 24028] Element.matches("!invalid!") should throw DOMException "SyntaxError", not JavaScript TypeError

https://www.w3.org/Bugs/Public/show_bug.cgi?id=24028

Arkadiusz Michalski (Spirit) <crimsteam@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |crimsteam@gmail.com

--- Comment #7 from Arkadiusz Michalski (Spirit) <crimsteam@gmail.com> ---
If you changed matches() then what about querySelector() and
querySelectorAll()? This methods are older than matches(), but still in
"scope-match a selectors string " algo we have:

2. If s is failure, throw a JavaScript TypeError. 

Firefox, Chrome and IE return SyntaxError (query() and queryAll() still not
supported so skipping them). This behaviour is correct per Selectors API Level
1/Selectors API Level 2:

http://www.w3.org/TR/selectors-api/#parse-a-selector
http://dev.w3.org/2006/webapi/selectors-api2/#parse-a-selector

so really any implementators wants/plans change this?

Similar for MutationObserver.observe(), but in this case we have something
news, and at least Chrome throw TypeError, so maybe in future other browsers do
the same.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 2 June 2014 19:09:38 UTC