saloe 0.0.58 → 0.0.60
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/listener.cjs.js +2 -4
- package/dist/listener.es.js +2 -4
- package/package.json +1 -1
- package/src/listener.js +2 -4
package/dist/listener.cjs.js
CHANGED
|
@@ -151,10 +151,8 @@ const listener = ({
|
|
|
151
151
|
};
|
|
152
152
|
const cloneSrcElement = ({ srcElement }) => {
|
|
153
153
|
const newSrcElement = document.createElement(srcElement == null ? void 0 : srcElement.tagName);
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
srcElement == null ? void 0 : srcElement.attributes.forEach((attr) => {
|
|
157
|
-
if (attr.startsWith("on-")) return;
|
|
154
|
+
Array.from(srcElement == null ? void 0 : srcElement.attributes).forEach((attr) => {
|
|
155
|
+
if (attr.name.startsWith("on-")) return;
|
|
158
156
|
newSrcElement.setAttribute(attr.name, attr.value);
|
|
159
157
|
});
|
|
160
158
|
return newSrcElement;
|
package/dist/listener.es.js
CHANGED
|
@@ -149,10 +149,8 @@ const listener = ({
|
|
|
149
149
|
};
|
|
150
150
|
const cloneSrcElement = ({ srcElement }) => {
|
|
151
151
|
const newSrcElement = document.createElement(srcElement == null ? void 0 : srcElement.tagName);
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
srcElement == null ? void 0 : srcElement.attributes.forEach((attr) => {
|
|
155
|
-
if (attr.startsWith("on-")) return;
|
|
152
|
+
Array.from(srcElement == null ? void 0 : srcElement.attributes).forEach((attr) => {
|
|
153
|
+
if (attr.name.startsWith("on-")) return;
|
|
156
154
|
newSrcElement.setAttribute(attr.name, attr.value);
|
|
157
155
|
});
|
|
158
156
|
return newSrcElement;
|
package/package.json
CHANGED
package/src/listener.js
CHANGED
|
@@ -216,11 +216,9 @@ const listener = ({
|
|
|
216
216
|
|
|
217
217
|
const cloneSrcElement = ({ srcElement }) => {
|
|
218
218
|
const newSrcElement = document.createElement(srcElement?.tagName)
|
|
219
|
-
console.log('--- srcElement =', srcElement)
|
|
220
|
-
console.log('--- srcElement.attributes =', srcElement.attributes)
|
|
221
219
|
|
|
222
|
-
srcElement?.attributes.forEach((attr) => {
|
|
223
|
-
if (attr.startsWith('on-')) return
|
|
220
|
+
Array.from(srcElement?.attributes).forEach((attr) => {
|
|
221
|
+
if (attr.name.startsWith('on-')) return
|
|
224
222
|
newSrcElement.setAttribute(attr.name, attr.value)
|
|
225
223
|
})
|
|
226
224
|
|