123456789101112131415161718192021222324252627282930313233343536 |
- 'use strict';
- function getActiveElement(doc) /*?DOMElement*/{
- doc = doc || (typeof document !== 'undefined' ? document : undefined);
- if (typeof doc === 'undefined') {
- return null;
- }
- try {
- return doc.activeElement || doc.body;
- } catch (e) {
- return doc.body;
- }
- }
- module.exports = getActiveElement;
|