index.js
function connectedToTheDom(node) {
      // IE does not have contains method on document element, only body   
      var container = node.ownerDocument.contains ? node.ownerDocument : node.ownerDocument.body;
      return container.contains(node);
    }
function connectedToTheDom(node) {
      // IE does not have contains method on document element, only body   
      var container = node.ownerDocument.contains ? node.ownerDocument : node.ownerDocument.body;
      return container.contains(node);
    }
function connectedToTheDom ( node ) { // IE does not have contains method on document element, only body    var container = node . ownerDocument . contains ? node . ownerDocument : node . ownerDocument . body ; return container . contains ( node ) ; }
returns true if the element is contained within a document
returns true if the element is contained within a document