I have a div element with a data attribute that I need to use to select that element but I'm drawing a blank on how to do that.
HTML
<div class="element" data-id="123456789"></div>
JS
var element = document.body.querySelector('.element[data-id=123456789]');