title: Getting Window focus in Google Chrome
body: <p>I need to identify when google chrome browser get focused. And specifically the browser tab in which my page is loaded.</p>
  
  <p>Scenario:
  I have a page opened in Google Chrome browser. Whenever the window ( corresponding browser tab) gets focused (mouse click/keyboard navigation) I need to invoke an event in javascript.</p>
  
  <p>[I have tried addEventListener and attaching 'focus' event, but it fires more than once when focusing the window. And not firing when clicking on address bar of browser.]</p>
  
  <p>Please help. Any hint would be appreciable.</p>
  
  <p>Thanks,
  Ani</p>