node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

contains

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