Check if an element is focused
JavaScript version
const hasFocus = (ele) => ele === document.activeElement;
TypeScript version
const hasFocus = (ele: Node): boolean => ele === document.activeElement;
JavaScript version
const hasFocus = (ele) => ele === document.activeElement;
TypeScript version
const hasFocus = (ele: Node): boolean => ele === document.activeElement;