dom-matches

WebJar for dom-matches

License

License

MIT
GroupId

GroupId

org.webjars.npm
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.npm/dom-matches/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>dom-matches</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/dom-matches/
implementation 'org.webjars.npm:dom-matches:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/dom-matches/
implementation ("org.webjars.npm:dom-matches:2.0.0")
'org.webjars.npm:dom-matches:jar:2.0.0'
<dependency org="org.webjars.npm" name="dom-matches" rev="2.0.0">
  <artifact name="dom-matches" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='dom-matches', version='2.0.0')
)
libraryDependencies += "org.webjars.npm" % "dom-matches" % "2.0.0"
[org.webjars.npm/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
1.0.1