(doc)
| 10334 | } |
| 10335 | |
| 10336 | function getActiveElement(doc) { |
| 10337 | doc = doc || (typeof document !== 'undefined' ? document : undefined); |
| 10338 | |
| 10339 | if (typeof doc === 'undefined') { |
| 10340 | return null; |
| 10341 | } |
| 10342 | |
| 10343 | try { |
| 10344 | return doc.activeElement || doc.body; |
| 10345 | } catch (e) { |
| 10346 | return doc.body; |
| 10347 | } |
| 10348 | } |
| 10349 | |
| 10350 | /** |
| 10351 | * Given any node return the first leaf node without children. |
no outgoing calls
no test coverage detected