However, in a browser, .section > > .important is an invalid selector, as shown by this JS Bin. It throws a DOMException.
I suppose the issue is that the space between the two child combinators is converted to a wildcard selector, but that creates an inconsistency between different selector engines and environments.
I'm using
jsdom@17.0.0
, which hasnwsapi@2.2.0
as a dependency. The following script runs without errors (it outputstrue
):However, in a browser,
.section > > .important
is an invalid selector, as shown by this JS Bin. It throws aDOMException
.I suppose the issue is that the space between the two child combinators is converted to a wildcard selector, but that creates an inconsistency between different selector engines and environments.