My goal is to select h2, h3, h4 heading level elements in DOM except the ones that are inside docs-body__heading class
I tried this:
document.querySelectorAll(`:not(.docs-body__heading) h2, h2, h4`);
Doesn't work.
So, how do I use querySelectorAll() on DOM excluding some part of it?