code: function() {
      var self = this;
      Pusher.EventsDispatcher.call(this);
      // This is okay, as IE doesn't support this stuff anyway.
      if (window.addEventListener !== undefined) {
        window.addEventListener("online", function() {
          self.emit('online', null);
        }, false);
        window.addEventListener("offline", function() {
          self.emit('offline', null);
        }, false);
      }
    }
docs: /*
  A little bauble to interface with window.navigator.onLine,
  window.ononline and window.onoffline.  Easier to mock.