@appsurify-testmap/rrweb-all 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.
@@ -713,20 +713,27 @@ const inlineEventAttributes = [
713
713
  "ontouchcancel"
714
714
  ];
715
715
  const interactiveElementsRegistry$1 = /* @__PURE__ */ new WeakSet();
716
- const originalAddEventListener$1 = EventTarget.prototype.addEventListener;
717
- EventTarget.prototype.addEventListener = function(type, listener, options) {
718
- originalAddEventListener$1.call(this, type, listener, options);
719
- if (this instanceof Element) {
720
- const eventType = type.toLowerCase();
721
- if (interactiveEvents$1.includes(eventType)) {
722
- interactiveElementsRegistry$1.add(this);
716
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
717
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
718
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
719
+ originalAddEventListener.call(this, type, listener, options);
720
+ if (this instanceof Element) {
721
+ const eventType = type.toLowerCase();
722
+ if (interactiveEvents$1.includes(eventType)) {
723
+ interactiveElementsRegistry$1.add(this);
724
+ }
723
725
  }
724
- }
725
- };
726
- const originalRemoveEventListener$1 = EventTarget.prototype.removeEventListener;
727
- EventTarget.prototype.removeEventListener = function(type, listener, options) {
728
- originalRemoveEventListener$1.call(this, type, listener, options);
729
- };
726
+ };
727
+ }
728
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
729
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
730
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
731
+ originalRemoveEventListener.call(this, type, listener, options);
732
+ if (this instanceof Element) {
733
+ type.toLowerCase();
734
+ }
735
+ };
736
+ }
730
737
  function hasEventListeners(n2) {
731
738
  return n2 instanceof Element && interactiveElementsRegistry$1.has(n2);
732
739
  }
@@ -5764,20 +5771,27 @@ const interactiveEvents = [
5764
5771
  "touchcancel"
5765
5772
  ];
5766
5773
  const interactiveElementsRegistry = /* @__PURE__ */ new WeakSet();
5767
- const originalAddEventListener = EventTarget.prototype.addEventListener;
5768
- EventTarget.prototype.addEventListener = function(type, listener, options) {
5769
- originalAddEventListener.call(this, type, listener, options);
5770
- if (this instanceof Element) {
5771
- const eventType = type.toLowerCase();
5772
- if (interactiveEvents.includes(eventType)) {
5773
- interactiveElementsRegistry.add(this);
5774
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
5775
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
5776
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
5777
+ originalAddEventListener.call(this, type, listener, options);
5778
+ if (this instanceof Element) {
5779
+ const eventType = type.toLowerCase();
5780
+ if (interactiveEvents.includes(eventType)) {
5781
+ interactiveElementsRegistry.add(this);
5782
+ }
5774
5783
  }
5775
- }
5776
- };
5777
- const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
5778
- EventTarget.prototype.removeEventListener = function(type, listener, options) {
5779
- originalRemoveEventListener.call(this, type, listener, options);
5780
- };
5784
+ };
5785
+ }
5786
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
5787
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
5788
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
5789
+ originalRemoveEventListener.call(this, type, listener, options);
5790
+ if (this instanceof Element) {
5791
+ type.toLowerCase();
5792
+ }
5793
+ };
5794
+ }
5781
5795
  function getDefaultExportFromCjs(x2) {
5782
5796
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
5783
5797
  }