@augment-vir/test
Version:
A universal testing suite that works with Mocha style test runners _and_ Node.js's built-in test runner.
11 lines (10 loc) • 303 B
JavaScript
/**
* Detects whether the given element is currently focused.
*
* @category Web : Elements
* @category Package : @augment-vir/web
* @package [`@augment-vir/web`](https://www.npmjs.com/package/@augment-vir/web)
*/
export function isElementFocused(element) {
return element.matches(':focus');
}