helpers/util.js
function isDomEventTarget (obj) {
	if (!(obj && obj.nodeName)) {
		return obj === window;
	}
	var nodeType = obj.nodeType;
	return (
		nodeType === 1 || // Node.ELEMENT_NODE
		nodeType === 9 || // Node.DOCUMENT_NODE
		nodeType === 11 // Node.DOCUMENT_FRAGMENT_NODE
	);
}
function isDomEventTarget (obj) {
	if (!(obj && obj.nodeName)) {
		return obj === window;
	}
	var nodeType = obj.nodeType;
	return (
		nodeType === 1 || // Node.ELEMENT_NODE
		nodeType === 9 || // Node.DOCUMENT_NODE
		nodeType === 11 // Node.DOCUMENT_FRAGMENT_NODE
	);
}
function isDomEventTarget ( obj ) { if ( ! ( obj && obj . nodeName ) ) { return obj === window ; } var nodeType = obj . nodeType ; return ( nodeType === 1 || // Node.ELEMENT_NODE nodeType === 9 || // Node.DOCUMENT_NODE nodeType === 11 // Node.DOCUMENT_FRAGMENT_NODE ) ; }
We do not account for all EventTarget classes, only EventTarget DOM nodes, fragments, and the window.
We do not account for all EventTarget classes only EventTarget DOM nodes fragments and the window .