MacGap triggers various events on the DOM document.

sleep

wake

appActivated

userDefaultsChanged

statusItemClick