@appsurify-testmap/rrdom 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.
package/dist/rrdom.cjs CHANGED
@@ -64,6 +64,85 @@ let Mirror$1 = class Mirror {
64
64
  function createMirror$1() {
65
65
  return new Mirror$1();
66
66
  }
67
+ const interactiveEvents = [
68
+ "change",
69
+ "submit",
70
+ "dragstart",
71
+ "drop",
72
+ "pointerdown",
73
+ "pointerup",
74
+ "input",
75
+ "keydown",
76
+ "keyup",
77
+ "keypress",
78
+ "mouseenter",
79
+ "mouseleave",
80
+ "mouseup",
81
+ "mousedown",
82
+ "click",
83
+ "contextmenu",
84
+ "dblclick",
85
+ "focus",
86
+ "blur",
87
+ "touchstart",
88
+ "touchmove",
89
+ "touchend",
90
+ "touchcancel"
91
+ ];
92
+ const inlineEventAttributes = [
93
+ "onclick",
94
+ "ondblclick",
95
+ "onmousedown",
96
+ "onmouseup",
97
+ "onmouseover",
98
+ "onmouseout",
99
+ "onmousemove",
100
+ "onfocus",
101
+ "onblur",
102
+ "onkeydown",
103
+ "onkeypress",
104
+ "onkeyup",
105
+ "onchange",
106
+ "oninput",
107
+ "onsubmit",
108
+ "onreset",
109
+ "onselect",
110
+ "oncontextmenu",
111
+ "ontouchstart",
112
+ "ontouchmove",
113
+ "ontouchend",
114
+ "ontouchcancel"
115
+ ];
116
+ const interactiveElementsRegistry = /* @__PURE__ */ new WeakSet();
117
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
118
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
119
+ originalAddEventListener.call(this, type, listener, options);
120
+ if (this instanceof Element) {
121
+ const eventType = type.toLowerCase();
122
+ if (interactiveEvents.includes(eventType)) {
123
+ interactiveElementsRegistry.add(this);
124
+ }
125
+ }
126
+ };
127
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
128
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
129
+ originalRemoveEventListener.call(this, type, listener, options);
130
+ };
131
+ function inspectInlineEventHandlers() {
132
+ const allElements = document.querySelectorAll("*");
133
+ allElements.forEach((el) => {
134
+ inlineEventAttributes.forEach((attr) => {
135
+ if (el.hasAttribute(attr)) {
136
+ interactiveElementsRegistry.add(el);
137
+ }
138
+ });
139
+ });
140
+ }
141
+ if (document.readyState === "complete" || document.readyState === "interactive") {
142
+ inspectInlineEventHandlers();
143
+ } else {
144
+ document.addEventListener("DOMContentLoaded", inspectInlineEventHandlers);
145
+ }
67
146
  function getDefaultExportFromCjs(x2) {
68
147
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
69
148
  }