Document.onoffline

The Document.onoffline event handler is called when an offline is fired on the <body> element and bubbles up, when navigator.onLine property changes and becomes false.