[whatwg] Proposal for a tab visibility API

On Fri, Dec 10, 2010 at 1:14 PM, Dennis Joachimsthaler <dennis at efjot.de> wrote:
>
> Maybe we can disallow the "visibilitychange" event to produce any dialogs
> or anything else that could give focus?

window.onvisibilitychange = function(e) {
  setTimeout(function() {
    alert("Worked around!");
  }, 0);
};

Or would browsers be able to track that the code was initially
triggered from visibilitychange? (including when programmatically
creating and dispatching another DOM events, instead of or in addition
to the setTimeout?)

-- 
Thomas Broyer
/t?.ma.b?wa.je/

Received on Friday, 10 December 2010 15:00:44 UTC