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.
@@ -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
- console.log("--- srcElement =", srcElement);
155
- console.log("--- srcElement.attributes =", srcElement.attributes);
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;
@@ -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
- console.log("--- srcElement =", srcElement);
153
- console.log("--- srcElement.attributes =", srcElement.attributes);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saloe",
3
- "version": "0.0.58",
3
+ "version": "0.0.60",
4
4
  "description": "Tools for making web development easy and efficient",
5
5
  "type": "module",
6
6
  "scripts": {
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