JSFiddle - React, Tailwind, and code Playground

by podgorniy

JavaScript

function filter (arr, filterFunc) {
    // ...
}

function matchesSelector (node, selector) {
   // ...
}


// with :not supported
var res = document.querySelectorAll('SELECTOR1:not(SELECTOR2)');


// without :not support
var res = filter(document.querySelectorAll('SELECTOR1'), function (node) {
	return !matchesSelector(node, 'SELECTOR2');
});