@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.js
CHANGED
|
@@ -87,59 +87,27 @@ const interactiveEvents = [
|
|
|
87
87
|
"touchend",
|
|
88
88
|
"touchcancel"
|
|
89
89
|
];
|
|
90
|
-
const inlineEventAttributes = [
|
|
91
|
-
"onclick",
|
|
92
|
-
"ondblclick",
|
|
93
|
-
"onmousedown",
|
|
94
|
-
"onmouseup",
|
|
95
|
-
"onmouseover",
|
|
96
|
-
"onmouseout",
|
|
97
|
-
"onmousemove",
|
|
98
|
-
"onfocus",
|
|
99
|
-
"onblur",
|
|
100
|
-
"onkeydown",
|
|
101
|
-
"onkeypress",
|
|
102
|
-
"onkeyup",
|
|
103
|
-
"onchange",
|
|
104
|
-
"oninput",
|
|
105
|
-
"onsubmit",
|
|
106
|
-
"onreset",
|
|
107
|
-
"onselect",
|
|
108
|
-
"oncontextmenu",
|
|
109
|
-
"ontouchstart",
|
|
110
|
-
"ontouchmove",
|
|
111
|
-
"ontouchend",
|
|
112
|
-
"ontouchcancel"
|
|
113
|
-
];
|
|
114
90
|
const interactiveElementsRegistry = /* @__PURE__ */ new WeakSet();
|
|
115
|
-
|
|
116
|
-
EventTarget.prototype.addEventListener
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
|
|
126
|
-
EventTarget.prototype.removeEventListener = function(type, listener, options) {
|
|
127
|
-
originalRemoveEventListener.call(this, type, listener, options);
|
|
128
|
-
};
|
|
129
|
-
function inspectInlineEventHandlers() {
|
|
130
|
-
const allElements = document.querySelectorAll("*");
|
|
131
|
-
allElements.forEach((el) => {
|
|
132
|
-
inlineEventAttributes.forEach((attr) => {
|
|
133
|
-
if (el.hasAttribute(attr)) {
|
|
134
|
-
interactiveElementsRegistry.add(el);
|
|
91
|
+
if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
|
|
92
|
+
const originalAddEventListener = EventTarget.prototype.addEventListener;
|
|
93
|
+
EventTarget.prototype.addEventListener = function(type, listener, options) {
|
|
94
|
+
originalAddEventListener.call(this, type, listener, options);
|
|
95
|
+
if (this instanceof Element) {
|
|
96
|
+
const eventType = type.toLowerCase();
|
|
97
|
+
if (interactiveEvents.includes(eventType)) {
|
|
98
|
+
interactiveElementsRegistry.add(this);
|
|
135
99
|
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
138
102
|
}
|
|
139
|
-
if (
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
103
|
+
if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
|
|
104
|
+
const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
|
|
105
|
+
EventTarget.prototype.removeEventListener = function(type, listener, options) {
|
|
106
|
+
originalRemoveEventListener.call(this, type, listener, options);
|
|
107
|
+
if (this instanceof Element) {
|
|
108
|
+
type.toLowerCase();
|
|
109
|
+
}
|
|
110
|
+
};
|
|
143
111
|
}
|
|
144
112
|
function getDefaultExportFromCjs(x2) {
|
|
145
113
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|