Re: [dom] matches, querySelector, etc. shouldn't throw on an unrecognized selector (#39)

I'm somewhat in favor of a Selector object, but if we're avoiding that, then having query() and queryAll() just not throw would be fine.

Re: a way to find if a selector is supported, I like foolip's idea - a `CSS.cleanSelector()` that returns the selector (with error clauses dropped) or null (if all comma-separated clauses were dropped).  Then maybe we can alter matches(), qS(), and qSA() to accept a `DOMString?` and just return false/an empty nodelist when passed a null, so you could write `el.matches(CSS.cleanSelector("foo"))` and it'll just work, without having to gate it behind an if statement.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/39#issuecomment-126126517

Received on Wednesday, 29 July 2015 23:28:57 UTC