@microsoft/applicationinsights-offlinechannel-js 0.3.11-nightly3.2511-05 → 0.3.11-nightly3.2511-09

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Offline Channel, 0.3.11-nightly3.2511-05
2
+ * Application Insights JavaScript SDK - Offline Channel, 0.3.11-nightly3.2511-09
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -2102,7 +2102,7 @@
2102
2102
  return result;
2103
2103
  }
2104
2104
 
2105
- var version$1 = '3.3.11-nightly3.2511-05';
2105
+ var version$1 = '3.3.11-nightly3.2511-09';
2106
2106
  var instanceName = "." + newId(6);
2107
2107
  var _dataUid = 0;
2108
2108
  function _canAcceptData(target) {
@@ -4526,6 +4526,7 @@
4526
4526
  var _DYN_SUPPORTS_SYNC_REQUES0 = "supportsSyncRequests";
4527
4527
  var _DYN_IS_ARR = "isArr";
4528
4528
  var _DYN_INDEX_OF = "indexOf";
4529
+ var _DYN_IS_ONLINE = "isOnline";
4529
4530
  var _DYN_CANCEL = "cancel";
4530
4531
  var _DYN_PROCESS_NEXT = "processNext";
4531
4532
  var _DYN_PERSISTENCE = "persistence";
@@ -6520,7 +6521,7 @@
6520
6521
  return Sender;
6521
6522
  }());
6522
6523
 
6523
- var version = '0.3.11-nightly3.2511-05';
6524
+ var version = '0.3.11-nightly3.2511-09';
6524
6525
  var DefaultOfflineIdentifier = "OfflineChannel";
6525
6526
  var DefaultBatchInterval = 15000;
6526
6527
  var DefaultInMemoMaxTime = 15000;
@@ -6599,7 +6600,7 @@
6599
6600
  _sender[_DYN_INITIALIZE ](coreConfig, core, ctx, _diagLogger, _primaryChannelId, _self._unloadHooks);
6600
6601
  _senderInst = _sender.getXhrInst();
6601
6602
  _offlineListener.addListener(function (val) {
6602
- if (!val.isOnline) {
6603
+ if (!val[_DYN_IS_ONLINE ]) {
6603
6604
  _sendNextBatchTimer && _sendNextBatchTimer[_DYN_CANCEL ]();
6604
6605
  }
6605
6606
  else {
@@ -6615,7 +6616,7 @@
6615
6616
  };
6616
6617
  _self.processTelemetry = function (evt, itemCtx) {
6617
6618
  try {
6618
- var onlineStatus = _offlineListener.isOnline();
6619
+ var onlineStatus = _offlineListener[_DYN_IS_ONLINE ]();
6619
6620
  itemCtx = itemCtx || _self._getTelCtx(itemCtx);
6620
6621
  if (!!onlineStatus || !_offineSupport || !_endpoint) {
6621
6622
  _self[_DYN_PROCESS_NEXT ](evt, itemCtx);
@@ -6826,12 +6827,12 @@
6826
6827
  return null;
6827
6828
  }
6828
6829
  function _setSendNextTimer() {
6829
- var isOnline = _offlineListener && _offlineListener.isOnline();
6830
+ var isOnline = _offlineListener && _offlineListener[_DYN_IS_ONLINE ]();
6830
6831
  if (!_sendNextBatchTimer) {
6831
6832
  var retryInterval = _retryAt ? mathMax(0, _retryAt - utcNow()) : 0;
6832
6833
  var timerValue = mathMax(_maxBatchInterval, retryInterval);
6833
6834
  _sendNextBatchTimer = scheduleTimeout(function () {
6834
- if (isOnline) {
6835
+ if (_offlineListener && _offlineListener[_DYN_IS_ONLINE ]()) {
6835
6836
  if (isFunction(_sender[_DYN_IS_COMPLETELY_IDLE ]) && !_sender[_DYN_IS_COMPLETELY_IDLE ]()) {
6836
6837
  _sendNextBatchTimer && _sendNextBatchTimer[_DYN_REFRESH ]();
6837
6838
  }