UNPKG

dev-classes

Version:
25 lines (24 loc) 819 B
var i = Object.defineProperty; var a = (r, t, o) => t in r ? i(r, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[t] = o; var e = (r, t, o) => (a(r, typeof t != "symbol" ? t + "" : t, o), o); class m { constructor(t) { e(this, "listNetworkInformation", []); this.listNetworkInformation = t; } getSystem() { return window != null && window.cordova ? "cordova" : "pc"; } run(t) { const o = this.getSystem(), s = this.listNetworkInformation.find((n) => n.getControls().system === o); s ? s.getControls().addWatchers(t) : console.error("NetworkInformation не активен на данной платформе"); } stop() { this.listNetworkInformation.forEach((t) => { t.getControls().removeWatchers(); }); } } export { m as NetworkInformation };