title: Difference between document.hidden vs document.hasFocus()
body: <p>Please explain the difference between <code>document.hidden</code> , the HTML5 Page Visibility API and <code>document.hasFocus()</code>. I am doing a project which pops <code>HTML5 Desktop Notification</code> when the tab is not focused. I am kind of confused which one to use.</p>