@appsurify-testmap/rrdom-nodejs 2.0.0-alpha.30 → 2.0.0-alpha.32

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.
@@ -6,6 +6,85 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
6
6
  var __defProp2 = Object.defineProperty;
7
7
  var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
8
  var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
9
+ const interactiveEvents = [
10
+ "change",
11
+ "submit",
12
+ "dragstart",
13
+ "drop",
14
+ "pointerdown",
15
+ "pointerup",
16
+ "input",
17
+ "keydown",
18
+ "keyup",
19
+ "keypress",
20
+ "mouseenter",
21
+ "mouseleave",
22
+ "mouseup",
23
+ "mousedown",
24
+ "click",
25
+ "contextmenu",
26
+ "dblclick",
27
+ "focus",
28
+ "blur",
29
+ "touchstart",
30
+ "touchmove",
31
+ "touchend",
32
+ "touchcancel"
33
+ ];
34
+ const inlineEventAttributes = [
35
+ "onclick",
36
+ "ondblclick",
37
+ "onmousedown",
38
+ "onmouseup",
39
+ "onmouseover",
40
+ "onmouseout",
41
+ "onmousemove",
42
+ "onfocus",
43
+ "onblur",
44
+ "onkeydown",
45
+ "onkeypress",
46
+ "onkeyup",
47
+ "onchange",
48
+ "oninput",
49
+ "onsubmit",
50
+ "onreset",
51
+ "onselect",
52
+ "oncontextmenu",
53
+ "ontouchstart",
54
+ "ontouchmove",
55
+ "ontouchend",
56
+ "ontouchcancel"
57
+ ];
58
+ const interactiveElementsRegistry = /* @__PURE__ */ new WeakSet();
59
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
60
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
61
+ originalAddEventListener.call(this, type, listener, options);
62
+ if (this instanceof Element) {
63
+ const eventType = type.toLowerCase();
64
+ if (interactiveEvents.includes(eventType)) {
65
+ interactiveElementsRegistry.add(this);
66
+ }
67
+ }
68
+ };
69
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
70
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
71
+ originalRemoveEventListener.call(this, type, listener, options);
72
+ };
73
+ function inspectInlineEventHandlers() {
74
+ const allElements = document.querySelectorAll("*");
75
+ allElements.forEach((el) => {
76
+ inlineEventAttributes.forEach((attr) => {
77
+ if (el.hasAttribute(attr)) {
78
+ interactiveElementsRegistry.add(el);
79
+ }
80
+ });
81
+ });
82
+ }
83
+ if (document.readyState === "complete" || document.readyState === "interactive") {
84
+ inspectInlineEventHandlers();
85
+ } else {
86
+ document.addEventListener("DOMContentLoaded", inspectInlineEventHandlers);
87
+ }
9
88
  function getDefaultExportFromCjs(x2) {
10
89
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
11
90
  }