RSSAmplifier

Siderite's Blog · Jul 8, 2026

querySelector immediate children with :scope

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

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…

Read on siderite.dev

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.