@appsurify-testmap/rrdom 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.
- package/dist/rrdom.cjs +18 -50
- package/dist/rrdom.cjs.map +1 -1
- package/dist/rrdom.js +18 -50
- package/dist/rrdom.js.map +1 -1
- package/dist/rrdom.umd.cjs +18 -50
- package/dist/rrdom.umd.cjs.map +2 -2
- package/dist/rrdom.umd.min.cjs +12 -12
- package/dist/rrdom.umd.min.cjs.map +3 -3
- package/package.json +3 -3
package/dist/rrdom.cjs
CHANGED
|
@@ -89,59 +89,27 @@ const interactiveEvents = [
|
|
|
89
89
|
"touchend",
|
|
90
90
|
"touchcancel"
|
|
91
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
92
|
const interactiveElementsRegistry = /* @__PURE__ */ new WeakSet();
|
|
117
|
-
|
|
118
|
-
EventTarget.prototype.addEventListener
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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);
|
|
93
|
+
if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
|
|
94
|
+
const originalAddEventListener = EventTarget.prototype.addEventListener;
|
|
95
|
+
EventTarget.prototype.addEventListener = function(type, listener, options) {
|
|
96
|
+
originalAddEventListener.call(this, type, listener, options);
|
|
97
|
+
if (this instanceof Element) {
|
|
98
|
+
const eventType = type.toLowerCase();
|
|
99
|
+
if (interactiveEvents.includes(eventType)) {
|
|
100
|
+
interactiveElementsRegistry.add(this);
|
|
137
101
|
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
102
|
+
}
|
|
103
|
+
};
|
|
140
104
|
}
|
|
141
|
-
if (
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
105
|
+
if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
|
|
106
|
+
const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
|
|
107
|
+
EventTarget.prototype.removeEventListener = function(type, listener, options) {
|
|
108
|
+
originalRemoveEventListener.call(this, type, listener, options);
|
|
109
|
+
if (this instanceof Element) {
|
|
110
|
+
type.toLowerCase();
|
|
111
|
+
}
|
|
112
|
+
};
|
|
145
113
|
}
|
|
146
114
|
function getDefaultExportFromCjs(x2) {
|
|
147
115
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|