@pendo/agent 2.343.1 → 2.344.1

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.
package/dist/dom.esm.js CHANGED
@@ -6165,6 +6165,15 @@ function deepCopy(obj) {
6165
6165
  }
6166
6166
  }
6167
6167
 
6168
+ // Markup alone can define window.pendo_options (DOM clobbering via an element's id), so only
6169
+ // accept it when it's a plain object the page actually assigned
6170
+ function getLegacyGlobalSnippetOptions() {
6171
+ var options = window.pendo_options;
6172
+ if (Object.prototype.toString.call(options) !== '[object Object]')
6173
+ return;
6174
+ return options;
6175
+ }
6176
+
6168
6177
  var originalOptions;
6169
6178
  var ConfigReader = (function () {
6170
6179
  // imports
@@ -6243,6 +6252,7 @@ var ConfigReader = (function () {
6243
6252
  addOption('additionalPublicAppIds', [PENDO_CONFIG_SRC, SNIPPET_SRC], undefined, undefined, ['additionalApiKeys']);
6244
6253
  addOption('allowedOriginServers');
6245
6254
  addOption('allowedOriginServerHashes');
6255
+ addOption('enforceAllowedOriginServers', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
6246
6256
  addOption('allowMixedApplicationFrames', [SNIPPET_SRC, PENDO_CONFIG_SRC], true);
6247
6257
  addOption('allowMixedApiKeyFrames', [SNIPPET_SRC, PENDO_CONFIG_SRC], true);
6248
6258
  /**
@@ -6494,16 +6504,16 @@ var ConfigReader = (function () {
6494
6504
  addOption('pendoGlobalKey', [PENDO_CONFIG_SRC]);
6495
6505
  /**
6496
6506
  * By default, if there are multiple frames on the page that have the web SDK installed, they will communicate
6497
- * using `window.postMessage`. If set to `true` the web SDK will instead use the browser's Broadcast Channel
6498
- * API to communicate. This will only work when all frames use the same domain.
6507
+ * using the browser's Broadcast Channel API. This will only work when all frames use the same domain. If set
6508
+ * to `false` the web SDK will instead use `window.postMessage`, which also works across domains.
6499
6509
  *
6500
6510
  * @access public
6501
6511
  * @category Config/Core
6502
6512
  * @name preferBroadcastChannel
6503
- * @default false
6513
+ * @default true
6504
6514
  * @type {boolean}
6505
6515
  */
6506
- addOption('preferBroadcastChannel', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
6516
+ addOption('preferBroadcastChannel', [SNIPPET_SRC, PENDO_CONFIG_SRC], true);
6507
6517
  /**
6508
6518
  * By default, the web SDK will scan the page every 500ms to determine if any new badges or guides are eligible.
6509
6519
  * To improve idle performance, this can be set to `true` and then the web SDK will instead use a mutation
@@ -6518,17 +6528,17 @@ var ConfigReader = (function () {
6518
6528
  addOption('preferMutationObserver', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
6519
6529
  addOption('preventCookieRefresh');
6520
6530
  /**
6521
- * By default, the web SDK adds an `unload` event listener to the page to make sure it sends events upon
6522
- * navigation. If set to `true`, the web SDK will instead use the `visibilitychange` event listener and send
6523
- * events when the visibility is changing to `"hidden"`.
6531
+ * By default, the web SDK uses the `visibilitychange` event listener and sends events when the visibility is
6532
+ * changing to `"hidden"`. If set to `false`, the web SDK will instead add an `unload` event listener to the
6533
+ * page to make sure it sends events upon navigation.
6524
6534
  *
6525
6535
  * @access public
6526
6536
  * @category Config/Core
6527
6537
  * @name preventUnloadListener
6528
- * @default false
6538
+ * @default true
6529
6539
  * @type {boolean}
6530
6540
  */
6531
- addOption('preventUnloadListener', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
6541
+ addOption('preventUnloadListener', [SNIPPET_SRC, PENDO_CONFIG_SRC], true);
6532
6542
  addOption('promotedWebSDKMetadataConfigurations', [PENDO_CONFIG_SRC], undefined, undefined, ['promotedAgentMetadataConfigurations']);
6533
6543
  /**
6534
6544
  * An array of strings or a function that returns an array of strings. The web SDK will then strip any query
@@ -6793,6 +6803,18 @@ var ConfigReader = (function () {
6793
6803
  */
6794
6804
  addOption('disableGuidePseudoStyles', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
6795
6805
  addOption('disableImportantStyleAttributes', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
6806
+ /**
6807
+ * When a guide has a backdrop enabled, by default elements outside the guide are hidden from assistive
6808
+ * technology using `aria-hidden`. If `true`, the web SDK will instead apply the `inert` attribute,
6809
+ * which also removes those elements from focus and pointer interaction.
6810
+ *
6811
+ * @access public
6812
+ * @category Config/Guides
6813
+ * @name useInertForBackdrop
6814
+ * @default false
6815
+ * @type {boolean}
6816
+ */
6817
+ addOption('useInertForBackdrop', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
6796
6818
  /**
6797
6819
  * Content of badge and target element activated guides will be prefetched on load to improve guide display
6798
6820
  * time unless set to `true`.
@@ -7050,7 +7072,7 @@ var ConfigReader = (function () {
7050
7072
  initializeOptions();
7051
7073
  var sourceGetters = {};
7052
7074
  sourceGetters[SNIPPET_SRC] = function () {
7053
- return { lookup: originalOptions || window.pendo_options, name: SNIPPET_SRC };
7075
+ return { lookup: originalOptions || getLegacyGlobalSnippetOptions(), name: SNIPPET_SRC };
7054
7076
  };
7055
7077
  sourceGetters[PENDO_CONFIG_SRC] = function () {
7056
7078
  var lookup = getPendoConfig();
@@ -7291,17 +7313,6 @@ function shouldWrapHashChange() {
7291
7313
  function isMobileUserAgent() {
7292
7314
  return (/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i).test(getUA());
7293
7315
  }
7294
- // WICG inert polyfills through 3.1.0 install their MutationObserver-driven manager even where
7295
- // the browser supports inert natively, and inject #inert-style when they do. With one active,
7296
- // inerting a large subtree costs a full tree walk plus a subtree observer for as long as the
7297
- // attribute stays, so treat the page as not supporting inert.
7298
- function supportsInert() {
7299
- var descriptor = window.HTMLElement && _.isFunction(Object.getOwnPropertyDescriptor) &&
7300
- Object.getOwnPropertyDescriptor(window.HTMLElement.prototype, 'inert');
7301
- var isNative = !!(descriptor && descriptor.get && isNativeCode(descriptor.get));
7302
- var isPolyfilled = !!document.getElementById('inert-style');
7303
- return isNative && !isPolyfilled;
7304
- }
7305
7316
  function isSafari(userAgent) {
7306
7317
  if (userAgent === void 0) { userAgent = getUA(); }
7307
7318
  return userAgent.indexOf('Safari') >= 0 && !isChromium(userAgent);
@@ -7316,7 +7327,6 @@ function isChromium(userAgent) {
7316
7327
  var sniffer = {
7317
7328
  supportsHistoryApi: shouldWrapNativeHistory,
7318
7329
  supportsHashChange: shouldWrapHashChange,
7319
- supportsInert: supportsInert,
7320
7330
  hasEvent: function (event) {
7321
7331
  // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have
7322
7332
  // it. In particular the event is not fired when backspace or delete key are pressed or
@@ -7541,7 +7551,7 @@ function applyMatrix2dRect(matrix2d, rect) {
7541
7551
  return transformedRect;
7542
7552
  }
7543
7553
 
7544
- var VERSION = '2.343.1_';
7554
+ var VERSION = '2.344.1_';
7545
7555
 
7546
7556
  var decodeURIComponent = _.isFunction(globalScope.decodeURIComponent) ? globalScope.decodeURIComponent : _.identity;
7547
7557
 
@@ -8487,7 +8497,6 @@ Eventable.clear = function (events) {
8487
8497
  new EventType('recording:unpaused', [LIFECYCLE]),
8488
8498
  new EventType('recording:paused', [LIFECYCLE]),
8489
8499
  new EventType('consent:changed', [LIFECYCLE]),
8490
- new EventType('identifyRequested', [DEBUG, LIFECYCLE]),
8491
8500
  new EventType('childFrameJoined', [FRAMES]),
8492
8501
  new EventType('tabIdChanged:self', [DEBUG, LIFECYCLE])
8493
8502
  ];