on/offline event capture

Test required here: File -> Work Offline - toggle the value and there should be three list items notifying of online and offline.

  • via body "on" events:
  • via window "on" events:
  • via window.addEventListener:

Note that the test shows that window.ononline and window.onoffline doesn't work (which I thought I had read in the specs somewhere...).