Determining real visibility in HTML5

I'm looking for a way to determine if a region of the document is
actually visible to the end user. In particular, if the user agent
window is obscured by another window, I would want this to return false.

The rationale for doing this is when you have a web application that
performs expensive operations (either locally or by invoking server side
actions) then it is advantageous to suppress those operations until such
time as the application becomes visible (whereupon the expensive
operations can be resumed)

The 'onfocus' event isn't right as the focus doesn't have to be in a
window in order for the window to be (partially) visible.

I looked through the HTML spec, but I couldn't see anything obvious that
would help me solve this problem.

Thanks

Philip

-- 
Philip Gladstone
Distinguished Engineer
Product Development
pgladstone@cisco.com
Phone: +1 978-ZEN-TOAD (+1 978 936 8623)
Google: +1 978 800 1010
Ham radio: N1DQ

Cisco.com - http://www.cisco.com

This email may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html

Received on Wednesday, 5 May 2010 20:34:27 UTC