author | ymh <ymh.work@gmail.com> |
Wed, 16 Oct 2019 11:23:38 +0200 | |
changeset 14 | 00ac8f60d73f |
parent 9 | 177826044cd9 |
child 18 | be944660c56a |
permissions | -rw-r--r-- |
(function() { function contains(node) { if (!(0 in arguments)) { throw new TypeError('1 argument is required'); } do { if (this === node) { return true; } } while (node = node && node.parentNode); return false; } // IE if ('HTMLElement' in this && 'contains' in HTMLElement.prototype) { try { delete HTMLElement.prototype.contains; } catch (e) {} } if ('Node' in this) { Node.prototype.contains = contains; } else { document.contains = Element.prototype.contains = contains; } }());