adding :scope to dom pseudoclass
For now in querySelector only a subset of css selectors are implemented, the :scope pseudo selector target the current element.
Use cases
const sections = event.document.querySelectorAll("section");
for (const section of sections) {
const heading = document.querySelector(`
:scope > h1, :scope > h2, :scope > h3,
:scope > h4, :scope > h5, :scope > h6
`);
if(!heading) this.report("section need heading")
}