0.2.0 • Published 9 years ago

dom-contains v0.2.0

Weekly downloads
15
License
MIT
Repository
github
Last release
9 years ago

dom-contains

Determines whether or not one HTMLElement is or contains another HTMLElement.

This is a commonjs clone for Y.DOM.contains.

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.