How can you do the equivalent to
document.querySelectorAll(\'[data-foo]\')
where query
That works too:
document.querySelector([attribute="value"]);
So:
document.querySelector([data-foo="bar"]);