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.