| 141 | el.removeEventListener(event, fn, !IE11OrLess && captureMode); |
| 142 | } |
| 143 | function matches( /**HTMLElement*/el, /**String*/selector) { |
| 144 | if (!selector) return; |
| 145 | selector[0] === '>' && (selector = selector.substring(1)); |
| 146 | if (el) { |
| 147 | try { |
| 148 | if (el.matches) { |
| 149 | return el.matches(selector); |
| 150 | } else if (el.msMatchesSelector) { |
| 151 | return el.msMatchesSelector(selector); |
| 152 | } else if (el.webkitMatchesSelector) { |
| 153 | return el.webkitMatchesSelector(selector); |
| 154 | } |
| 155 | } catch (_) { |
| 156 | return false; |
| 157 | } |
| 158 | } |
| 159 | return false; |
| 160 | } |
| 161 | function getParentOrHost(el) { |
| 162 | return el.host && el !== document && el.host.nodeType && el.host !== el ? el.host : el.parentNode; |
| 163 | } |