dom-matches

WebJar for dom-matches

License

License

MIT
GroupId

GroupId

org.webjars.bowergithub.necolas
ArtifactId

ArtifactId

dom-matches
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

dom-matches
WebJar for dom-matches
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/necolas/dom-matches

Download dom-matches

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bowergithub.necolas/dom-matches/ -->
<dependency>
    <groupId>org.webjars.bowergithub.necolas</groupId>
    <artifactId>dom-matches</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bowergithub.necolas/dom-matches/
implementation 'org.webjars.bowergithub.necolas:dom-matches:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.bowergithub.necolas/dom-matches/
implementation ("org.webjars.bowergithub.necolas:dom-matches:2.0.0")
'org.webjars.bowergithub.necolas:dom-matches:jar:2.0.0'
<dependency org="org.webjars.bowergithub.necolas" name="dom-matches" rev="2.0.0">
  <artifact name="dom-matches" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bowergithub.necolas', module='dom-matches', version='2.0.0')
)
libraryDependencies += "org.webjars.bowergithub.necolas" % "dom-matches" % "2.0.0"
[org.webjars.bowergithub.necolas/dom-matches "2.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

dom-matches

Build Status

Check if a DOM element matches a given selector.

Installation

npm install dom-matches

API

matches(elem, selector)

  • elem: a DOM node.
  • selector: a CSS selector string.
var matches = require('dom-matches');
var elem = document.querySelector('.foo');

matches(elem, '.foo');
// => true

matches(elem, '.bar');
// => false

Browser support

  • Google Chrome
  • Firefox ESR+
  • Internet Explorer 10+
  • Safari 6+
  • Opera

Versions

Version
2.0.0