@appsurify-testmap/rrweb 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.
package/dist/rrweb.cjs CHANGED
@@ -666,20 +666,27 @@ const inlineEventAttributes = [
666
666
  "ontouchcancel"
667
667
  ];
668
668
  const interactiveElementsRegistry$1 = /* @__PURE__ */ new WeakSet();
669
- const originalAddEventListener$1 = EventTarget.prototype.addEventListener;
670
- EventTarget.prototype.addEventListener = function(type, listener, options) {
671
- originalAddEventListener$1.call(this, type, listener, options);
672
- if (this instanceof Element) {
673
- const eventType = type.toLowerCase();
674
- if (interactiveEvents$1.includes(eventType)) {
675
- interactiveElementsRegistry$1.add(this);
669
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
670
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
671
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
672
+ originalAddEventListener.call(this, type, listener, options);
673
+ if (this instanceof Element) {
674
+ const eventType = type.toLowerCase();
675
+ if (interactiveEvents$1.includes(eventType)) {
676
+ interactiveElementsRegistry$1.add(this);
677
+ }
676
678
  }
677
- }
678
- };
679
- const originalRemoveEventListener$1 = EventTarget.prototype.removeEventListener;
680
- EventTarget.prototype.removeEventListener = function(type, listener, options) {
681
- originalRemoveEventListener$1.call(this, type, listener, options);
682
- };
679
+ };
680
+ }
681
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
682
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
683
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
684
+ originalRemoveEventListener.call(this, type, listener, options);
685
+ if (this instanceof Element) {
686
+ type.toLowerCase();
687
+ }
688
+ };
689
+ }
683
690
  function hasEventListeners(n2) {
684
691
  return n2 instanceof Element && interactiveElementsRegistry$1.has(n2);
685
692
  }
@@ -5713,20 +5720,27 @@ const interactiveEvents = [
5713
5720
  "touchcancel"
5714
5721
  ];
5715
5722
  const interactiveElementsRegistry = /* @__PURE__ */ new WeakSet();
5716
- const originalAddEventListener = EventTarget.prototype.addEventListener;
5717
- EventTarget.prototype.addEventListener = function(type, listener, options) {
5718
- originalAddEventListener.call(this, type, listener, options);
5719
- if (this instanceof Element) {
5720
- const eventType = type.toLowerCase();
5721
- if (interactiveEvents.includes(eventType)) {
5722
- interactiveElementsRegistry.add(this);
5723
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
5724
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
5725
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
5726
+ originalAddEventListener.call(this, type, listener, options);
5727
+ if (this instanceof Element) {
5728
+ const eventType = type.toLowerCase();
5729
+ if (interactiveEvents.includes(eventType)) {
5730
+ interactiveElementsRegistry.add(this);
5731
+ }
5723
5732
  }
5724
- }
5725
- };
5726
- const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
5727
- EventTarget.prototype.removeEventListener = function(type, listener, options) {
5728
- originalRemoveEventListener.call(this, type, listener, options);
5729
- };
5733
+ };
5734
+ }
5735
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
5736
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
5737
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
5738
+ originalRemoveEventListener.call(this, type, listener, options);
5739
+ if (this instanceof Element) {
5740
+ type.toLowerCase();
5741
+ }
5742
+ };
5743
+ }
5730
5744
  function getDefaultExportFromCjs(x2) {
5731
5745
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
5732
5746
  }