@microsoft/applicationinsights-core-js 2.8.0-beta.2203-03 → 2.8.0-beta.2203-06

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.
Files changed (100) hide show
  1. package/browser/applicationinsights-core-js.integrity.json +9 -9
  2. package/browser/applicationinsights-core-js.js +129 -26
  3. package/browser/applicationinsights-core-js.js.map +1 -1
  4. package/browser/applicationinsights-core-js.min.js +2 -2
  5. package/browser/applicationinsights-core-js.min.js.map +1 -1
  6. package/dist/applicationinsights-core-js.api.json +1667 -177
  7. package/dist/applicationinsights-core-js.api.md +62 -8
  8. package/dist/applicationinsights-core-js.d.ts +121 -7
  9. package/dist/applicationinsights-core-js.js +129 -26
  10. package/dist/applicationinsights-core-js.js.map +1 -1
  11. package/dist/applicationinsights-core-js.min.js +2 -2
  12. package/dist/applicationinsights-core-js.min.js.map +1 -1
  13. package/dist/applicationinsights-core-js.rollup.d.ts +124 -10
  14. package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
  15. package/dist-esm/JavaScriptSDK/BaseCore.js +29 -10
  16. package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
  17. package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +30 -2
  18. package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js.map +1 -1
  19. package/dist-esm/JavaScriptSDK/ChannelController.js +14 -2
  20. package/dist-esm/JavaScriptSDK/ChannelController.js.map +1 -1
  21. package/dist-esm/JavaScriptSDK/Constants.js +1 -1
  22. package/dist-esm/JavaScriptSDK/CookieMgr.js +3 -2
  23. package/dist-esm/JavaScriptSDK/CookieMgr.js.map +1 -1
  24. package/dist-esm/JavaScriptSDK/CoreUtils.js +1 -1
  25. package/dist-esm/JavaScriptSDK/DataCacheHelper.js +1 -1
  26. package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
  27. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +14 -1
  28. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
  29. package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
  30. package/dist-esm/JavaScriptSDK/EventHelpers.js +18 -13
  31. package/dist-esm/JavaScriptSDK/EventHelpers.js.map +1 -1
  32. package/dist-esm/JavaScriptSDK/HelperFuncs.js +2 -12
  33. package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
  34. package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
  35. package/dist-esm/JavaScriptSDK/InternalConstants.js +1 -1
  36. package/dist-esm/JavaScriptSDK/NotificationManager.js +1 -1
  37. package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
  38. package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +56 -5
  39. package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js.map +1 -1
  40. package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
  41. package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +1 -1
  42. package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +3 -2
  43. package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js.map +1 -1
  44. package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +3 -2
  45. package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js.map +1 -1
  46. package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
  47. package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
  48. package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
  49. package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
  50. package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +8 -0
  51. package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js.map +1 -0
  52. package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
  53. package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
  54. package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
  55. package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
  56. package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
  57. package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
  58. package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
  59. package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
  60. package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
  61. package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
  62. package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
  63. package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
  64. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
  65. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
  66. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
  67. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
  68. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
  69. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +8 -0
  70. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js.map +1 -0
  71. package/dist-esm/applicationinsights-core-js.js +2 -2
  72. package/dist-esm/applicationinsights-core-js.js.map +1 -1
  73. package/package.json +1 -1
  74. package/src/JavaScriptSDK/BaseCore.ts +44 -9
  75. package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +54 -2
  76. package/src/JavaScriptSDK/ChannelController.ts +18 -1
  77. package/src/JavaScriptSDK/CookieMgr.ts +3 -1
  78. package/src/JavaScriptSDK/DiagnosticLogger.ts +14 -0
  79. package/src/JavaScriptSDK/EventHelpers.ts +18 -12
  80. package/src/JavaScriptSDK/HelperFuncs.ts +3 -1
  81. package/src/JavaScriptSDK/ProcessTelemetryContext.ts +71 -8
  82. package/src/JavaScriptSDK/TelemetryInitializerPlugin.ts +3 -1
  83. package/src/JavaScriptSDK/UnloadHandlerContainer.ts +3 -1
  84. package/src/JavaScriptSDK.Enums/TelemetryUpdateReason.ts +27 -0
  85. package/src/JavaScriptSDK.Interfaces/IInstrumentHooks.ts +11 -6
  86. package/src/JavaScriptSDK.Interfaces/IProcessTelemetryContext.ts +25 -2
  87. package/src/JavaScriptSDK.Interfaces/ITelemetryPlugin.ts +12 -1
  88. package/src/JavaScriptSDK.Interfaces/ITelemetryUpdateState.ts +34 -0
  89. package/types/JavaScriptSDK/BaseCore.d.ts +11 -2
  90. package/types/JavaScriptSDK/BaseTelemetryPlugin.d.ts +17 -1
  91. package/types/JavaScriptSDK/DiagnosticLogger.d.ts +10 -0
  92. package/types/JavaScriptSDK/EventHelpers.d.ts +4 -2
  93. package/types/JavaScriptSDK/HelperFuncs.d.ts +2 -1
  94. package/types/JavaScriptSDK/ProcessTelemetryContext.d.ts +9 -1
  95. package/types/JavaScriptSDK.Enums/TelemetryUpdateReason.d.ts +20 -0
  96. package/types/JavaScriptSDK.Interfaces/IInstrumentHooks.d.ts +5 -0
  97. package/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext.d.ts +23 -2
  98. package/types/JavaScriptSDK.Interfaces/ITelemetryPlugin.d.ts +11 -1
  99. package/types/JavaScriptSDK.Interfaces/ITelemetryUpdateState.d.ts +22 -0
  100. package/types/applicationinsights-core-js.d.ts +5 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Core, 2.8.0-beta.2203-03
2
+ * Application Insights JavaScript SDK - Core, 2.8.0-beta.2203-06
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -347,6 +347,7 @@
347
347
  var strIsInitialized = "isInitialized";
348
348
  var strTeardown = "teardown";
349
349
  var strCore = "core";
350
+ var strUpdate = "update";
350
351
  var strDisabled = "disabled";
351
352
  var strDoTeardown = "_doTeardown";
352
353
  var strProcessNext = "processNext";
@@ -845,7 +846,7 @@
845
846
  }
846
847
  return theObject;
847
848
  }
848
- function objExtend(obj, obj2, obj3, obj4, obj5, obj6) {
849
+ function objExtend(obj1, obj2, obj3, obj4, obj5, obj6) {
849
850
  var theArgs = arguments;
850
851
  var extended = theArgs[0] || {};
851
852
  var argLen = theArgs.length;
@@ -1303,6 +1304,10 @@
1303
1304
  }
1304
1305
  return DiagnosticLogger;
1305
1306
  }());
1307
+ function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1308
+ if (isUserAct === void 0) { isUserAct = false; }
1309
+ (logger || new DiagnosticLogger()).throwInternal(severity, msgId, msg, properties, isUserAct);
1310
+ }
1306
1311
 
1307
1312
  var strExecutionContextKey = "ctx";
1308
1313
  var _defaultPerfManager = null;
@@ -1730,7 +1735,7 @@
1730
1735
  completeDetails.func.call(completeDetails.self, completeDetails.args);
1731
1736
  }
1732
1737
  catch (e) {
1733
- core.logger.throwInternal(2 , 73 , "Unexpected Exception during onComplete - " + dumpObj(e));
1738
+ _throwInternal(core.logger, 2 , 73 , "Unexpected Exception during onComplete - " + dumpObj(e));
1734
1739
  }
1735
1740
  });
1736
1741
  _onComplete = [];
@@ -1829,6 +1834,27 @@
1829
1834
  context.createNew = _createNew;
1830
1835
  return context;
1831
1836
  }
1837
+ function createProcessTelemetryUpdateContext(telemetryChain, config, core, startAt) {
1838
+ var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
1839
+ var context = internalContext.ctx;
1840
+ function _processNext(updateState) {
1841
+ return context.iterate(function (plugin) {
1842
+ if (isFunction(plugin[strUpdate])) {
1843
+ plugin[strUpdate](context, updateState);
1844
+ }
1845
+ });
1846
+ }
1847
+ function _createNew(plugins, startAt) {
1848
+ if (plugins === void 0) { plugins = null; }
1849
+ if (isArray(plugins)) {
1850
+ plugins = createTelemetryProxyChain(plugins, config, core, startAt);
1851
+ }
1852
+ return createProcessTelemetryUpdateContext(plugins || context.getNext(), config, core, startAt);
1853
+ }
1854
+ context.processNext = _processNext;
1855
+ context.createNew = _createNew;
1856
+ return context;
1857
+ }
1832
1858
  function createTelemetryProxyChain(plugins, config, core, startAt) {
1833
1859
  var firstProxy = null;
1834
1860
  var add = startAt ? false : true;
@@ -1875,6 +1901,7 @@
1875
1901
  },
1876
1902
  processTelemetry: _processTelemetry,
1877
1903
  unload: _unloadPlugin,
1904
+ update: _updatePlugin,
1878
1905
  _id: chainId,
1879
1906
  _setNext: function (nextPlugin) {
1880
1907
  nextProxy = nextPlugin;
@@ -1914,7 +1941,7 @@
1914
1941
  hasRun = true;
1915
1942
  }
1916
1943
  if (!nextProxy || !hasNextRun) {
1917
- itemCtx.diagLog().throwInternal(1 , 73 , "Plugin [" + plugin.identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
1944
+ _throwInternal(itemCtx.diagLog(), 1 , 73 , "Plugin [" + plugin.identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
1918
1945
  }
1919
1946
  }
1920
1947
  }, details, isAsync);
@@ -1962,6 +1989,24 @@
1962
1989
  unloadCtx.processNext(unloadState);
1963
1990
  }
1964
1991
  }
1992
+ function _updatePlugin(updateCtx, updateState) {
1993
+ function _callUpdate() {
1994
+ var hasRun = false;
1995
+ if (plugin) {
1996
+ var pluginState = _getPluginState(plugin);
1997
+ var pluginCore = plugin[strCore] || pluginState.core;
1998
+ if (plugin && (!pluginCore || pluginCore === updateCtx[strCore]()) && !pluginState[strTeardown]) {
1999
+ if (plugin[strUpdate] && plugin[strUpdate](updateCtx, updateState) === true) {
2000
+ hasRun = true;
2001
+ }
2002
+ }
2003
+ }
2004
+ return hasRun;
2005
+ }
2006
+ if (!_processChain(updateCtx, _callUpdate, "update", function () { }, false)) {
2007
+ updateCtx.processNext(updateState);
2008
+ }
2009
+ }
1965
2010
  return objFreeze(proxyChain);
1966
2011
  }
1967
2012
  var ProcessTelemetryContext = /** @class */ (function () {
@@ -2139,7 +2184,7 @@
2139
2184
  _supportsCookies = doc[strCookie] !== undefined;
2140
2185
  }
2141
2186
  catch (e) {
2142
- logger && logger.throwInternal(2 , 68 , "Cannot access document.cookie - " + getExceptionName(e), { exception: dumpObj(e) });
2187
+ _throwInternal(logger, 2 , 68 , "Cannot access document.cookie - " + getExceptionName(e), { exception: dumpObj(e) });
2143
2188
  }
2144
2189
  }
2145
2190
  return _supportsCookies;
@@ -2268,6 +2313,17 @@
2268
2313
  }
2269
2314
  _runChainOnComplete();
2270
2315
  }
2316
+ function _doUpdate(updateCtx, updateState) {
2317
+ var theUpdateState = updateState || {
2318
+ reason: 0
2319
+ };
2320
+ _processChannelQueue(channelQueue, updateCtx, function (chainCtx) {
2321
+ chainCtx[strProcessNext](theUpdateState);
2322
+ }, function () {
2323
+ updateCtx[strProcessNext](theUpdateState);
2324
+ });
2325
+ return true;
2326
+ }
2271
2327
  function _doTeardown(unloadCtx, unloadState) {
2272
2328
  var theUnloadState = unloadState || {
2273
2329
  reason: 0 ,
@@ -2319,7 +2375,8 @@
2319
2375
  }, function () {
2320
2376
  itemCtx[strProcessNext](item);
2321
2377
  });
2322
- }
2378
+ },
2379
+ update: _doUpdate
2323
2380
  },
2324
2381
  _a[strPause] = function () {
2325
2382
  _processChannelQueue(channelQueue, _getTelCtx(), function (chainCtx) {
@@ -2417,7 +2474,7 @@
2417
2474
  handler(unloadCtx, unloadState);
2418
2475
  }
2419
2476
  catch (e) {
2420
- unloadCtx.diagLog().throwInternal(2 , 73 , "Unexpected error calling unload handler - " + dumpObj(e));
2477
+ _throwInternal(unloadCtx.diagLog(), 2 , 73 , "Unexpected error calling unload handler - " + dumpObj(e));
2421
2478
  }
2422
2479
  });
2423
2480
  handlers = [];
@@ -2476,6 +2533,30 @@
2476
2533
  }
2477
2534
  return result;
2478
2535
  };
2536
+ _self.update = function (updateCtx, updateState) {
2537
+ if (!_self.core || (updateCtx && _self.core !== updateCtx.core())) {
2538
+ return;
2539
+ }
2540
+ var result;
2541
+ var updateDone = false;
2542
+ var theUpdateCtx = updateCtx || createProcessTelemetryUpdateContext(null, {}, _self.core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
2543
+ var theUpdateState = updateState || {
2544
+ reason: 0
2545
+ };
2546
+ function _updateCallback() {
2547
+ if (!updateDone) {
2548
+ updateDone = true;
2549
+ _setDefaults(theUpdateCtx.getCfg(), theUpdateCtx.core(), theUpdateCtx.getNext());
2550
+ }
2551
+ }
2552
+ if (!_self._doUpdate || _self._doUpdate(theUpdateCtx, theUpdateState, _updateCallback) !== true) {
2553
+ _updateCallback();
2554
+ }
2555
+ else {
2556
+ result = true;
2557
+ }
2558
+ return result;
2559
+ };
2479
2560
  _self._addHook = function (hooks) {
2480
2561
  if (hooks) {
2481
2562
  if (isArray(hooks)) {
@@ -2590,7 +2671,7 @@
2590
2671
  }
2591
2672
  }
2592
2673
  catch (e) {
2593
- itemCtx.diagLog().throwInternal(1 , 64 , "One of telemetry initializers failed, telemetry item will not be sent: " + getExceptionName(e), { exception: dumpObj(e) }, true);
2674
+ _throwInternal(itemCtx.diagLog(), 1 , 64 , "One of telemetry initializers failed, telemetry item will not be sent: " + getExceptionName(e), { exception: dumpObj(e) }, true);
2594
2675
  }
2595
2676
  }
2596
2677
  }
@@ -2711,7 +2792,7 @@
2711
2792
  _configExtensions = [];
2712
2793
  _configExtensions.push.apply(_configExtensions, __spreadArrayFn(__spreadArrayFn([], extensions, false), config.extensions));
2713
2794
  _channelConfig = (config || {}).channels;
2714
- _initPluginChain(config);
2795
+ _initPluginChain(config, null);
2715
2796
  if (_self.getTransmissionControls().length === 0) {
2716
2797
  throwError("No channels available");
2717
2798
  }
@@ -2854,22 +2935,28 @@
2854
2935
  _logOrThrowError("Plugin [" + plugin.identifier + "] is already loaded!");
2855
2936
  return;
2856
2937
  }
2938
+ var updateState = {
2939
+ reason: 16
2940
+ };
2857
2941
  function _addPlugin(removed) {
2858
2942
  _configExtensions.push(plugin);
2859
- _initPluginChain(_self.config);
2943
+ updateState.added = [plugin];
2944
+ _initPluginChain(_self.config, updateState);
2860
2945
  addCb && addCb(true);
2861
2946
  }
2862
2947
  if (existingPlugin) {
2863
- var removedPlugins = [existingPlugin.plugin];
2948
+ var removedPlugins_1 = [existingPlugin.plugin];
2864
2949
  var unloadState = {
2865
2950
  reason: 2 ,
2866
2951
  isAsync: isAsync
2867
2952
  };
2868
- _removePlugins(removedPlugins, unloadState, function (removed) {
2953
+ _removePlugins(removedPlugins_1, unloadState, function (removed) {
2869
2954
  if (!removed) {
2870
2955
  addCb && addCb(false);
2871
2956
  }
2872
2957
  else {
2958
+ updateState.removed = removedPlugins_1;
2959
+ updateState.reason |= 32 ;
2873
2960
  _addPlugin();
2874
2961
  }
2875
2962
  });
@@ -2907,7 +2994,7 @@
2907
2994
  function _createTelCtx() {
2908
2995
  return createProcessTelemetryContext(_getPluginChain(), _self.config, _self);
2909
2996
  }
2910
- function _initPluginChain(config) {
2997
+ function _initPluginChain(config, updateState) {
2911
2998
  var theExtensions = _validateExtensions(_self.logger, ChannelControllerPriority, _configExtensions);
2912
2999
  _coreExtensions = theExtensions.core;
2913
3000
  _pluginChain = null;
@@ -2933,6 +3020,9 @@
2933
3020
  _channelControl.initialize(config, _self, allExtensions);
2934
3021
  initializePlugins(_createTelCtx(), allExtensions);
2935
3022
  _self._extensions = objFreeze(sortPlugins(_coreExtensions || [])).slice();
3023
+ if (updateState) {
3024
+ _doUpdate(updateState);
3025
+ }
2936
3026
  }
2937
3027
  function _getPlugin(pluginIdentifier) {
2938
3028
  var theExt = null;
@@ -2965,7 +3055,10 @@
2965
3055
  };
2966
3056
  _removePlugins(pluginsToRemove, unloadState, function (removed) {
2967
3057
  if (removed) {
2968
- _initPluginChain(_self.config);
3058
+ _initPluginChain(_self.config, {
3059
+ reason: 32 ,
3060
+ removed: pluginsToRemove
3061
+ });
2969
3062
  }
2970
3063
  removeCb && removeCb(removed);
2971
3064
  });
@@ -3062,10 +3155,16 @@
3062
3155
  var extConfig = getSetValue(config, strExtensionConfig);
3063
3156
  extConfig.NotificationManager = _notificationManager;
3064
3157
  }
3158
+ function _doUpdate(updateState) {
3159
+ var updateCtx = createProcessTelemetryUpdateContext(_getPluginChain(), _self.config, _self);
3160
+ if (!_self._updateHook || _self._updateHook(updateCtx, updateState) !== true) {
3161
+ updateCtx.processNext(updateState);
3162
+ }
3163
+ }
3065
3164
  function _logOrThrowError(message) {
3066
3165
  var logger = _self.logger;
3067
3166
  if (logger) {
3068
- logger.throwInternal(2 , 73 , message);
3167
+ _throwInternal(logger, 2 , 73 , message);
3069
3168
  }
3070
3169
  else {
3071
3170
  throwError(message);
@@ -3199,12 +3298,12 @@
3199
3298
  }
3200
3299
  return name;
3201
3300
  }
3202
- function _getEvtNamespace(eventName, namespaces) {
3203
- if (namespaces) {
3301
+ function _getEvtNamespace(eventName, evtNamespace) {
3302
+ if (evtNamespace) {
3204
3303
  var theNamespace_1 = "";
3205
- if (isArray(namespaces)) {
3304
+ if (isArray(evtNamespace)) {
3206
3305
  theNamespace_1 = "";
3207
- arrForEach(namespaces, function (name) {
3306
+ arrForEach(evtNamespace, function (name) {
3208
3307
  name = _normalizeNamespace(name);
3209
3308
  if (name) {
3210
3309
  if (name[0] !== ".") {
@@ -3215,7 +3314,7 @@
3215
3314
  });
3216
3315
  }
3217
3316
  else {
3218
- theNamespace_1 = _normalizeNamespace(namespaces);
3317
+ theNamespace_1 = _normalizeNamespace(evtNamespace);
3219
3318
  }
3220
3319
  if (theNamespace_1) {
3221
3320
  if (theNamespace_1[0] !== ".") {
@@ -3230,16 +3329,19 @@
3230
3329
  ns: ((parsedEvent[2] || "").split(".").sort()).join(".")
3231
3330
  };
3232
3331
  }
3233
- function __getRegisteredEvents(target, evtName) {
3332
+ function __getRegisteredEvents(target, eventName, evtNamespace) {
3234
3333
  var theEvents = [];
3235
3334
  var eventCache = elmNodeData.get(target, strEvents, {}, false);
3335
+ var evtName = _getEvtNamespace(eventName, evtNamespace);
3236
3336
  objForEachKey(eventCache, function (evtType, registeredEvents) {
3237
3337
  arrForEach(registeredEvents, function (value) {
3238
- if (!evtName || evtName === value.evtName.type) {
3239
- theEvents.push({
3240
- name: value.evtName.type + (value.evtName.ns ? "." + value.evtName.ns : ""),
3241
- handler: value.handler
3242
- });
3338
+ if (!evtName.type || evtName.type === value.evtName.type) {
3339
+ if (!evtName.ns || evtName.ns === evtName.ns) {
3340
+ theEvents.push({
3341
+ name: value.evtName.type + (value.evtName.ns ? "." + value.evtName.ns : ""),
3342
+ handler: value.handler
3343
+ });
3344
+ }
3243
3345
  }
3244
3346
  });
3245
3347
  });
@@ -3868,6 +3970,7 @@
3868
3970
  exports._InternalMessageId = _InternalMessageId;
3869
3971
  exports.__getRegisteredEvents = __getRegisteredEvents;
3870
3972
  exports._legacyCookieMgr = _legacyCookieMgr;
3973
+ exports._throwInternal = _throwInternal;
3871
3974
  exports.addEventHandler = addEventHandler;
3872
3975
  exports.addEventListeners = addEventListeners;
3873
3976
  exports.addPageHideEventListener = addPageHideEventListener;