( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX)
| 162 | return el.host && el !== document && el.host.nodeType && el.host !== el ? el.host : el.parentNode; |
| 163 | } |
| 164 | function closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) { |
| 165 | if (el) { |
| 166 | ctx = ctx || document; |
| 167 | do { |
| 168 | if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) { |
| 169 | return el; |
| 170 | } |
| 171 | if (el === ctx) break; |
| 172 | /* jshint boss:true */ |
| 173 | } while (el = getParentOrHost(el)); |
| 174 | } |
| 175 | return null; |
| 176 | } |
| 177 | var R_SPACE = /\s+/g; |
| 178 | function toggleClass(el, name, state) { |
| 179 | if (el && name) { |
no test coverage detected
searching dependent graphs…