This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
If matches() was changed: https://www.w3.org/Bugs/Public/show_bug.cgi?id=24028 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 DOMException "SyntaxError", not JavaScript TypeError (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?
Yeah, not my battle. TC39 can sort this out. https://github.com/whatwg/dom/commit/1bb586f40753b5030b043c364f8eecee1e3e3d58