Select DOM element only with JS : <p>I have a div that only contains data attribute, I want to select it from console with javascript</p>

<pre><code>&lt;div data-contents="true"&gt;
</code></pre>

<p>I tried <code>document.querySelectorAll('div &gt; data-contents="true"')</code></p>

<p>Doesn't work</p>
