Re: [whatwg/dom] Element.matches and pseudo-elements (#185)

Augh, I didn't pay enough attention to the OP here anyway.

Wrt the OP, `document.body.matches('body::after')` definitely returns false as currently specified.  "Evaluate the selector" ends up returning *just* the body's ::after pseudo-element, and then "match the selector against an element" doesn't find `<body>` in the list, so you get false, as expected.  So, DOM doesn't need to do anything here.

`querySelector()` does need to pass an empty list of allowed pseudo-elements, tho, since otherwise you get nonsensical results (there's no way to reflect a pseudo-element as a JS object right now).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/185#issuecomment-240456170

Received on Wednesday, 17 August 2016 15:51:28 UTC