@appsurify-testmap/rrweb-replay 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.
@@ -118,20 +118,27 @@ const interactiveEvents$1 = [
118
118
  "touchcancel"
119
119
  ];
120
120
  const interactiveElementsRegistry$1 = /* @__PURE__ */ new WeakSet();
121
- const originalAddEventListener$1 = EventTarget.prototype.addEventListener;
122
- EventTarget.prototype.addEventListener = function(type, listener, options) {
123
- originalAddEventListener$1.call(this, type, listener, options);
124
- if (this instanceof Element) {
125
- const eventType = type.toLowerCase();
126
- if (interactiveEvents$1.includes(eventType)) {
127
- interactiveElementsRegistry$1.add(this);
121
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
122
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
123
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
124
+ originalAddEventListener.call(this, type, listener, options);
125
+ if (this instanceof Element) {
126
+ const eventType = type.toLowerCase();
127
+ if (interactiveEvents$1.includes(eventType)) {
128
+ interactiveElementsRegistry$1.add(this);
129
+ }
128
130
  }
129
- }
130
- };
131
- const originalRemoveEventListener$1 = EventTarget.prototype.removeEventListener;
132
- EventTarget.prototype.removeEventListener = function(type, listener, options) {
133
- originalRemoveEventListener$1.call(this, type, listener, options);
134
- };
131
+ };
132
+ }
133
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
134
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
135
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
136
+ originalRemoveEventListener.call(this, type, listener, options);
137
+ if (this instanceof Element) {
138
+ type.toLowerCase();
139
+ }
140
+ };
141
+ }
135
142
  const MEDIA_SELECTOR = /(max|min)-device-(width|height)/;
136
143
  const MEDIA_SELECTOR_GLOBAL = new RegExp(MEDIA_SELECTOR.source, "g");
137
144
  const mediaSelectorPlugin = {
@@ -4189,20 +4196,27 @@ const interactiveEvents = [
4189
4196
  "touchcancel"
4190
4197
  ];
4191
4198
  const interactiveElementsRegistry = /* @__PURE__ */ new WeakSet();
4192
- const originalAddEventListener = EventTarget.prototype.addEventListener;
4193
- EventTarget.prototype.addEventListener = function(type, listener, options) {
4194
- originalAddEventListener.call(this, type, listener, options);
4195
- if (this instanceof Element) {
4196
- const eventType = type.toLowerCase();
4197
- if (interactiveEvents.includes(eventType)) {
4198
- interactiveElementsRegistry.add(this);
4199
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
4200
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
4201
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
4202
+ originalAddEventListener.call(this, type, listener, options);
4203
+ if (this instanceof Element) {
4204
+ const eventType = type.toLowerCase();
4205
+ if (interactiveEvents.includes(eventType)) {
4206
+ interactiveElementsRegistry.add(this);
4207
+ }
4199
4208
  }
4200
- }
4201
- };
4202
- const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
4203
- EventTarget.prototype.removeEventListener = function(type, listener, options) {
4204
- originalRemoveEventListener.call(this, type, listener, options);
4205
- };
4209
+ };
4210
+ }
4211
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
4212
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
4213
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
4214
+ originalRemoveEventListener.call(this, type, listener, options);
4215
+ if (this instanceof Element) {
4216
+ type.toLowerCase();
4217
+ }
4218
+ };
4219
+ }
4206
4220
  function getDefaultExportFromCjs(x2) {
4207
4221
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
4208
4222
  }