@mapbox/query-selector-contains-node
Advanced tools
Comparing version 0.1.0 to 1.0.0
# Changelog | ||
## 0.1.0 | ||
## 1.0.0 | ||
- Start this log. |
{ | ||
"name": "@mapbox/query-selector-contains-node", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"description": "Check whether a node is contained by any other node on the page matching a selector", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -17,8 +17,20 @@ # @mapbox/query-selector-contains-node | ||
`querySelectorContainsElement(selector: string, node: Node): boolean` | ||
`querySelectorContainsElement(selector, node)` | ||
Returns `true` if any of the node's ancestors match the `selector` (a CSS selector suitable for [`document.querySelectorAll()`]). | ||
Also returns `true` if the node itself matches the `selector`. | ||
Returns `true` if any of the `node`'s ancestors match the `selector`. | ||
Also returns `true` if the `node` itself matches the `selector`. | ||
Otherwise, returns `false`. | ||
#### selector | ||
Type: `string`. | ||
**Required.** | ||
A CSS selector suitable for [`document.querySelectorAll()`]. | ||
#### node | ||
Type: `Node`. | ||
**Required.** | ||
## Example | ||
@@ -25,0 +37,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
9674
0
64