MCPcopy Create free account
hub / github.com/SnapDrop/snapdrop / constructor

Method constructor

client/scripts/ui.js:494–498  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

492class NetworkStatusUI {
493
494 constructor() {
495 window.addEventListener('offline', e => this._showOfflineMessage(), false);
496 window.addEventListener('online', e => this._showOnlineMessage(), false);
497 if (!navigator.onLine) this._showOfflineMessage();
498 }
499
500 _showOfflineMessage() {
501 Events.fire('notify-user', 'You are offline');

Callers

nothing calls this directly

Calls 2

_showOfflineMessageMethod · 0.95
_showOnlineMessageMethod · 0.95

Tested by

no test coverage detected