const el = document.querySelector('.username'); console.log(el === document.activeElement);Code language: JavaScript (javascript)