There's a script running on my website but I want it to be executed only when certain element is NOT focused. Here's my general idea how it'd look
window.setInterval(function(){
if (document.getElementById('someElement') != focused) {
doSomething;
}
}, 1000);
The "someElement" is set to be editable so it can be clicked (focused).
My question is how would "!= focused" look in javascript.