views:

57

answers:

0

I am wondering if it is possible to get a event when the user switches back to "your" page's window? This could happen either when the user opens a new tab and then switches back to your page's tab or when the user closes safari and then opens it again.

I want to be able to update content on the page once I get this event. I am using a setInterval to accomplish this now, but it would be nice to not have the delay when the user focuses on your window.

Thanks!