An extension to the window object to detect focus and blur
This event is triggered when a tab has been given focus from a blur.
window.addEventListener("TabFocus", function(){ console.info("event test tab focus"); });
This event is triggered when a tab has been given blur from a focus.
window.addEventListener("TabBlur", function(){ console.info("event test tab blur"); });