@appsurify-testmap/rrweb-player 2.0.0-alpha.35 → 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.
@@ -545,59 +545,27 @@ const interactiveEvents$1 = [
545
545
  "touchend",
546
546
  "touchcancel"
547
547
  ];
548
- const inlineEventAttributes$1 = [
549
- "onclick",
550
- "ondblclick",
551
- "onmousedown",
552
- "onmouseup",
553
- "onmouseover",
554
- "onmouseout",
555
- "onmousemove",
556
- "onfocus",
557
- "onblur",
558
- "onkeydown",
559
- "onkeypress",
560
- "onkeyup",
561
- "onchange",
562
- "oninput",
563
- "onsubmit",
564
- "onreset",
565
- "onselect",
566
- "oncontextmenu",
567
- "ontouchstart",
568
- "ontouchmove",
569
- "ontouchend",
570
- "ontouchcancel"
571
- ];
572
548
  const interactiveElementsRegistry$1 = /* @__PURE__ */ new WeakSet();
573
- const originalAddEventListener$1 = EventTarget.prototype.addEventListener;
574
- EventTarget.prototype.addEventListener = function(type, listener, options) {
575
- originalAddEventListener$1.call(this, type, listener, options);
576
- if (this instanceof Element) {
577
- const eventType = type.toLowerCase();
578
- if (interactiveEvents$1.includes(eventType)) {
579
- interactiveElementsRegistry$1.add(this);
580
- }
581
- }
582
- };
583
- const originalRemoveEventListener$1 = EventTarget.prototype.removeEventListener;
584
- EventTarget.prototype.removeEventListener = function(type, listener, options) {
585
- originalRemoveEventListener$1.call(this, type, listener, options);
586
- };
587
- function inspectInlineEventHandlers$1() {
588
- const allElements = document.querySelectorAll("*");
589
- allElements.forEach((el) => {
590
- inlineEventAttributes$1.forEach((attr2) => {
591
- if (el.hasAttribute(attr2)) {
592
- interactiveElementsRegistry$1.add(el);
549
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
550
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
551
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
552
+ originalAddEventListener.call(this, type, listener, options);
553
+ if (this instanceof Element) {
554
+ const eventType = type.toLowerCase();
555
+ if (interactiveEvents$1.includes(eventType)) {
556
+ interactiveElementsRegistry$1.add(this);
593
557
  }
594
- });
595
- });
558
+ }
559
+ };
596
560
  }
597
- if (document.readyState === "complete" || document.readyState === "interactive") {
598
- inspectInlineEventHandlers$1();
599
- } else {
600
- document.addEventListener("DOMContentLoaded", inspectInlineEventHandlers$1);
561
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
562
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
563
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
564
+ originalRemoveEventListener.call(this, type, listener, options);
565
+ if (this instanceof Element) {
566
+ type.toLowerCase();
567
+ }
568
+ };
601
569
  }
602
570
  const MEDIA_SELECTOR = /(max|min)-device-(width|height)/;
603
571
  const MEDIA_SELECTOR_GLOBAL = new RegExp(MEDIA_SELECTOR.source, "g");
@@ -4659,59 +4627,27 @@ const interactiveEvents = [
4659
4627
  "touchend",
4660
4628
  "touchcancel"
4661
4629
  ];
4662
- const inlineEventAttributes = [
4663
- "onclick",
4664
- "ondblclick",
4665
- "onmousedown",
4666
- "onmouseup",
4667
- "onmouseover",
4668
- "onmouseout",
4669
- "onmousemove",
4670
- "onfocus",
4671
- "onblur",
4672
- "onkeydown",
4673
- "onkeypress",
4674
- "onkeyup",
4675
- "onchange",
4676
- "oninput",
4677
- "onsubmit",
4678
- "onreset",
4679
- "onselect",
4680
- "oncontextmenu",
4681
- "ontouchstart",
4682
- "ontouchmove",
4683
- "ontouchend",
4684
- "ontouchcancel"
4685
- ];
4686
4630
  const interactiveElementsRegistry = /* @__PURE__ */ new WeakSet();
4687
- const originalAddEventListener = EventTarget.prototype.addEventListener;
4688
- EventTarget.prototype.addEventListener = function(type, listener, options) {
4689
- originalAddEventListener.call(this, type, listener, options);
4690
- if (this instanceof Element) {
4691
- const eventType = type.toLowerCase();
4692
- if (interactiveEvents.includes(eventType)) {
4693
- interactiveElementsRegistry.add(this);
4694
- }
4695
- }
4696
- };
4697
- const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
4698
- EventTarget.prototype.removeEventListener = function(type, listener, options) {
4699
- originalRemoveEventListener.call(this, type, listener, options);
4700
- };
4701
- function inspectInlineEventHandlers() {
4702
- const allElements = document.querySelectorAll("*");
4703
- allElements.forEach((el) => {
4704
- inlineEventAttributes.forEach((attr2) => {
4705
- if (el.hasAttribute(attr2)) {
4706
- interactiveElementsRegistry.add(el);
4631
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
4632
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
4633
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
4634
+ originalAddEventListener.call(this, type, listener, options);
4635
+ if (this instanceof Element) {
4636
+ const eventType = type.toLowerCase();
4637
+ if (interactiveEvents.includes(eventType)) {
4638
+ interactiveElementsRegistry.add(this);
4707
4639
  }
4708
- });
4709
- });
4640
+ }
4641
+ };
4710
4642
  }
4711
- if (document.readyState === "complete" || document.readyState === "interactive") {
4712
- inspectInlineEventHandlers();
4713
- } else {
4714
- document.addEventListener("DOMContentLoaded", inspectInlineEventHandlers);
4643
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
4644
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
4645
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
4646
+ originalRemoveEventListener.call(this, type, listener, options);
4647
+ if (this instanceof Element) {
4648
+ type.toLowerCase();
4649
+ }
4650
+ };
4715
4651
  }
4716
4652
  function getDefaultExportFromCjs(x2) {
4717
4653
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;