Element.matches

  • Revision slug: DOM/Element.mozMatchesSelector
  • Revision title: Element.mozMatchesSelector
  • Revision id: 30625
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment page created, 48 words added

Revision Content

{{ DomRef() }}

Summary

Returns true if the element would be selected by the specified selector string; otherwise, returns false.

Syntax

result = node.mozMatchesSelector(selectorString) 
  • result holds the return value true or false.
  • selectorString is a string representing the selector to test.

Example

Notes

Specification

Not part of any specification.

Revision Source

<p>{{ DomRef() }}</p>
<h3 name="Summary">Summary</h3>
<p>Returns <code>true</code> if the element would be selected by the specified selector string; otherwise, returns <code>false</code>.</p>
<h3 name="Syntax">Syntax</h3>
<pre class="eval"><em>result</em> = <em>node</em>.mozMatchesSelector(selectorString) 
</pre>
<ul> <li><code>result</code> holds the return value <code>true</code> or <code>false</code>.</li> <li><code>selectorString</code> is a string representing the selector to test.</li>
</ul>
<h3 name="Example">Example</h3>
<h3>Notes</h3>
<h3>Specification</h3>
<p>Not part of any specification.</p>
Revert to this revision