shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
isFocus
Type:Function
Status:stable
Since:1.0.0
Platform:js
@blackbyte.sugar.js.is
Check if the mouse is focus the passed HTMLElement
Params
- $elm*-HTMLElement
The HTMLElement to check
Return
- -Boolean
true if element is focus, false if not
Example
import { isFocus } from '@blackbyte/sugar/is'
const $myElm = document.querySelector('.my-elm')
if (isFocus($myElm)) {
// do something
}Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space