Do we have any access to the DOM document and / or window objects? If not do we have access to any other top level objects? I want to have: document.hasFocus(); accessible in some of my API scripts or "window" object and be able to do stuff like: var isonfocus=true;
window.onblur = function(){
isonfocus=false;
}
window.onfocus = function(){
isonfocus=true;
} Long story short: Do we have access to any DOM objects or any API related abstract objects that allow us to tell if the game window has focus or not?