Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mapbox/query-selector-contains-node

Package Overview
Dependencies
Maintainers
165
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mapbox/query-selector-contains-node - npm Package Compare versions

Comparing version 0.1.0 to 1.0.0

2

CHANGELOG.md
# 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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc