saloe 0.0.43 → 0.0.44
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 +5 -5
- package/dist/listener.es.js +5 -5
- package/package.json +1 -1
- package/src/listener.js +5 -5
package/dist/listener.cjs.js
CHANGED
|
@@ -163,23 +163,23 @@ const listener = ({
|
|
|
163
163
|
if (srcElement == null ? void 0 : srcElement.removeAttribute) srcElement.removeAttribute(`on-${event}`);
|
|
164
164
|
};
|
|
165
165
|
});
|
|
166
|
-
const
|
|
166
|
+
const saloeListenEvent = new CustomEvent("saloeListen", {
|
|
167
167
|
detail: { message: "This is a custom event!" }
|
|
168
168
|
});
|
|
169
|
-
document.body.addEventListener("
|
|
169
|
+
document.body.addEventListener("saloeListen", async (event) => {
|
|
170
170
|
await addScripts();
|
|
171
171
|
fireLoadListener();
|
|
172
172
|
console.log("--- event =", event);
|
|
173
173
|
fireObserverListeners();
|
|
174
174
|
});
|
|
175
|
-
document.body.
|
|
176
|
-
document.body.dispatchEvent(
|
|
175
|
+
document.body.saloeListen = function() {
|
|
176
|
+
document.body.dispatchEvent(saloeListenEvent);
|
|
177
177
|
};
|
|
178
178
|
};
|
|
179
179
|
fireListeners();
|
|
180
180
|
window.onload = () => {
|
|
181
181
|
setTimeout(() => {
|
|
182
|
-
document.body.
|
|
182
|
+
document.body.saloeListen();
|
|
183
183
|
}, 2500);
|
|
184
184
|
};
|
|
185
185
|
};
|
package/dist/listener.es.js
CHANGED
|
@@ -161,23 +161,23 @@ const listener = ({
|
|
|
161
161
|
if (srcElement == null ? void 0 : srcElement.removeAttribute) srcElement.removeAttribute(`on-${event}`);
|
|
162
162
|
};
|
|
163
163
|
});
|
|
164
|
-
const
|
|
164
|
+
const saloeListenEvent = new CustomEvent("saloeListen", {
|
|
165
165
|
detail: { message: "This is a custom event!" }
|
|
166
166
|
});
|
|
167
|
-
document.body.addEventListener("
|
|
167
|
+
document.body.addEventListener("saloeListen", async (event) => {
|
|
168
168
|
await addScripts();
|
|
169
169
|
fireLoadListener();
|
|
170
170
|
console.log("--- event =", event);
|
|
171
171
|
fireObserverListeners();
|
|
172
172
|
});
|
|
173
|
-
document.body.
|
|
174
|
-
document.body.dispatchEvent(
|
|
173
|
+
document.body.saloeListen = function() {
|
|
174
|
+
document.body.dispatchEvent(saloeListenEvent);
|
|
175
175
|
};
|
|
176
176
|
};
|
|
177
177
|
fireListeners();
|
|
178
178
|
window.onload = () => {
|
|
179
179
|
setTimeout(() => {
|
|
180
|
-
document.body.
|
|
180
|
+
document.body.saloeListen();
|
|
181
181
|
}, 2500);
|
|
182
182
|
};
|
|
183
183
|
};
|
package/package.json
CHANGED
package/src/listener.js
CHANGED
|
@@ -242,19 +242,19 @@ const listener = ({
|
|
|
242
242
|
}
|
|
243
243
|
})
|
|
244
244
|
|
|
245
|
-
const
|
|
245
|
+
const saloeListenEvent = new CustomEvent('saloeListen', {
|
|
246
246
|
detail: { message: 'This is a custom event!' }
|
|
247
247
|
})
|
|
248
248
|
|
|
249
|
-
document.body.addEventListener('
|
|
249
|
+
document.body.addEventListener('saloeListen', async (event) => {
|
|
250
250
|
await addScripts()
|
|
251
251
|
fireLoadListener()
|
|
252
252
|
console.log('--- event =', event)
|
|
253
253
|
fireObserverListeners()
|
|
254
254
|
})
|
|
255
255
|
|
|
256
|
-
document.body.
|
|
257
|
-
document.body.dispatchEvent(
|
|
256
|
+
document.body.saloeListen = function () {
|
|
257
|
+
document.body.dispatchEvent(saloeListenEvent)
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
}
|
|
@@ -264,7 +264,7 @@ const listener = ({
|
|
|
264
264
|
window.onload = () => {
|
|
265
265
|
setTimeout(() => {
|
|
266
266
|
// document?.body?.click()
|
|
267
|
-
document.body.
|
|
267
|
+
document.body.saloeListen()
|
|
268
268
|
}, 2_500)
|
|
269
269
|
}
|
|
270
270
|
}
|