@appsurify-testmap/rrweb-record 2.0.0-alpha.40 → 2.0.0-alpha.41

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.
@@ -654,20 +654,27 @@ const inlineEventAttributes = [
654
654
  "ontouchcancel"
655
655
  ];
656
656
  const interactiveElementsRegistry$1 = /* @__PURE__ */ new WeakSet();
657
- const originalAddEventListener$1 = EventTarget.prototype.addEventListener;
658
- EventTarget.prototype.addEventListener = function(type, listener, options) {
659
- originalAddEventListener$1.call(this, type, listener, options);
660
- if (this instanceof Element) {
661
- const eventType = type.toLowerCase();
662
- if (interactiveEvents$1.includes(eventType)) {
663
- interactiveElementsRegistry$1.add(this);
657
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
658
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
659
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
660
+ originalAddEventListener.call(this, type, listener, options);
661
+ if (this instanceof Element) {
662
+ const eventType = type.toLowerCase();
663
+ if (interactiveEvents$1.includes(eventType)) {
664
+ interactiveElementsRegistry$1.add(this);
665
+ }
664
666
  }
665
- }
666
- };
667
- const originalRemoveEventListener$1 = EventTarget.prototype.removeEventListener;
668
- EventTarget.prototype.removeEventListener = function(type, listener, options) {
669
- originalRemoveEventListener$1.call(this, type, listener, options);
670
- };
667
+ };
668
+ }
669
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
670
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
671
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
672
+ originalRemoveEventListener.call(this, type, listener, options);
673
+ if (this instanceof Element) {
674
+ type.toLowerCase();
675
+ }
676
+ };
677
+ }
671
678
  function hasEventListeners(n2) {
672
679
  return n2 instanceof Element && interactiveElementsRegistry$1.has(n2);
673
680
  }
@@ -5222,20 +5229,27 @@ const interactiveEvents = [
5222
5229
  "touchcancel"
5223
5230
  ];
5224
5231
  const interactiveElementsRegistry = /* @__PURE__ */ new WeakSet();
5225
- const originalAddEventListener = EventTarget.prototype.addEventListener;
5226
- EventTarget.prototype.addEventListener = function(type, listener, options) {
5227
- originalAddEventListener.call(this, type, listener, options);
5228
- if (this instanceof Element) {
5229
- const eventType = type.toLowerCase();
5230
- if (interactiveEvents.includes(eventType)) {
5231
- interactiveElementsRegistry.add(this);
5232
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
5233
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
5234
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
5235
+ originalAddEventListener.call(this, type, listener, options);
5236
+ if (this instanceof Element) {
5237
+ const eventType = type.toLowerCase();
5238
+ if (interactiveEvents.includes(eventType)) {
5239
+ interactiveElementsRegistry.add(this);
5240
+ }
5232
5241
  }
5233
- }
5234
- };
5235
- const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
5236
- EventTarget.prototype.removeEventListener = function(type, listener, options) {
5237
- originalRemoveEventListener.call(this, type, listener, options);
5238
- };
5242
+ };
5243
+ }
5244
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
5245
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
5246
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
5247
+ originalRemoveEventListener.call(this, type, listener, options);
5248
+ if (this instanceof Element) {
5249
+ type.toLowerCase();
5250
+ }
5251
+ };
5252
+ }
5239
5253
  function getDefaultExportFromCjs(x2) {
5240
5254
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
5241
5255
  }