Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zoubin/dom-contains
Determines whether or not one HTMLElement is or contains another HTMLElement.
https://github.com/zoubin/dom-contains
Last synced: 8 days ago
JSON representation
Determines whether or not one HTMLElement is or contains another HTMLElement.
- Host: GitHub
- URL: https://github.com/zoubin/dom-contains
- Owner: zoubin
- Created: 2015-09-04T05:44:13.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-04T06:01:13.000Z (about 9 years ago)
- Last Synced: 2024-11-05T08:39:04.266Z (14 days ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dom-contains
Determines whether or not one HTMLElement is or contains another HTMLElement.This is a commonjs clone for [Y.DOM.contains](http://yuilibrary.com/yui/docs/api/classes/DOM.html#method_contains).
```javascript
var contains = require('dom-contains');
```## contains(element, needle)
Return a boolean.
Whether or not the `element` is or contains the `needle`.
### element
Type: `HTMLElement`
The containing html element.
### needle
Type: `HTMLElement`
The html element that may be contained.