Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Document Object Model?

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?
1525815566
Jakob
Sheet Author
API Scripter
No. The API runs server-side anyway (think Node.js).
Jakob said: No. The API runs server-side anyway (think Node.js). Yeah The Aaron said something about Node.js to me before but I forgot about it. Thanks for replying. It's a shame - there's a lot of resource intensive stuff I could suspend if the page didn't have focus.