JS hasAttribute with data attribute value
<p>Is there a native way, no jQuery, to check if a dom element has the attribute with the selected value. For example: </p>

<pre><code>//assume doc has
data-mod="do" defined
</code></pre>

<p>This will be true:</p>

<p><code>document.hasAttribute('data-mod');</code></p>

<p>but this will be false:</p>

<p><code>document.hasAttribute('data-mod="do"')</code></p>

<p>Is there any way to natively check for a data attribute on a DOM element with the value?</p>