window.onfocus() and window.onblur() demo

Switch to a different program to blur this page.

You can also just click into the location bar (except in Safari).

Click this page again to focus it.

When blurred, this page will have a black background with white text.

The window is currently FOCUSEDBLURRED.

Click here for a discussion of this demo.