querySelector immediate children with :scope

Requirement You are on a web page, using JavaScript, and have a reference to an element node. And you want to select the immediate children of that node using the general syntax used by querySelectorAll , maybe with some extra constraints. What do you do? Failed attempt The CSS syntax for children of a node is using the greater-than character, something like this: #parentNode > * , but as soon as…