Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Check whether a DOM element is contained by another one
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
.npmignore
.testem.json
.travis.yml
LICENCE
README.md
index.js
package.json

README.md

contains

dependency status

browser support

Check whether a DOM element is contained by another one

Example

var contains = require("contains")

var container = document.getElementById("container")
var someElem = document.getElementById("someElem")

// does container contain someElem as a child?
var contained = contains(container, someElem)

Installation

npm install contains

Contributors

  • Raynos

MIT Licenced

Something went wrong with that request. Please try again.