contains

Check whether a DOM element is contained by another one

npm install contains
7 downloads in the last month

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

npm loves you