saloe 0.0.13 → 0.0.15

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.
@@ -23,7 +23,7 @@
23
23
  "license": "ISC",
24
24
  "devDependencies": {
25
25
  "@cloudflare/kv-asset-handler": "^0.3.4",
26
- "saloe": "^0.0.12",
26
+ "saloe": "^0.0.13",
27
27
  "vite": "^5.4.3"
28
28
  }
29
29
  }
@@ -54,6 +54,7 @@ const listener = () => {
54
54
  };
55
55
  const addScripts = () => {
56
56
  const scriptsToLoad = [...document.querySelectorAll("script[data-script-to-load]")];
57
+ console.log("--- scriptsToLoad =", scriptsToLoad);
57
58
  return Promise.all(
58
59
  scriptsToLoad == null ? void 0 : scriptsToLoad.map((scriptToLoad) => {
59
60
  var _a;
@@ -150,7 +151,10 @@ const listener = () => {
150
151
  const fireListeners = () => {
151
152
  EVENTS_FIRE_DOCUMENT_BODY_LISTENERS == null ? void 0 : EVENTS_FIRE_DOCUMENT_BODY_LISTENERS.forEach((event) => {
152
153
  document.body[`on${event}`] = async (e) => {
153
- await addScripts();
154
+ console.log("--- prev: addScripts");
155
+ const x = await addScripts();
156
+ console.log("--- value:", x);
157
+ console.log("--- after: addScripts");
154
158
  fireLoadListener();
155
159
  fireObserverListeners();
156
160
  };
@@ -52,6 +52,7 @@ const listener = () => {
52
52
  };
53
53
  const addScripts = () => {
54
54
  const scriptsToLoad = [...document.querySelectorAll("script[data-script-to-load]")];
55
+ console.log("--- scriptsToLoad =", scriptsToLoad);
55
56
  return Promise.all(
56
57
  scriptsToLoad == null ? void 0 : scriptsToLoad.map((scriptToLoad) => {
57
58
  var _a;
@@ -148,7 +149,10 @@ const listener = () => {
148
149
  const fireListeners = () => {
149
150
  EVENTS_FIRE_DOCUMENT_BODY_LISTENERS == null ? void 0 : EVENTS_FIRE_DOCUMENT_BODY_LISTENERS.forEach((event) => {
150
151
  document.body[`on${event}`] = async (e) => {
151
- await addScripts();
152
+ console.log("--- prev: addScripts");
153
+ const x = await addScripts();
154
+ console.log("--- value:", x);
155
+ console.log("--- after: addScripts");
152
156
  fireLoadListener();
153
157
  fireObserverListeners();
154
158
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saloe",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "Tools for making web development easy and efficient",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/listener.js CHANGED
@@ -60,6 +60,7 @@ const listener = () => {
60
60
 
61
61
  const addScripts = () => {
62
62
  const scriptsToLoad = [...document.querySelectorAll('script[data-script-to-load]')]
63
+ console.log('--- scriptsToLoad =', scriptsToLoad)
63
64
  return Promise.all(
64
65
  scriptsToLoad?.map((scriptToLoad) => {
65
66
  const id = scriptToLoad?.getAttribute('data-script-to-load')
@@ -212,7 +213,10 @@ const listener = () => {
212
213
  const fireListeners = () => {
213
214
  EVENTS_FIRE_DOCUMENT_BODY_LISTENERS?.forEach((event) => {
214
215
  document.body[`on${event}`] = async (e) => {
215
- await addScripts()
216
+ console.log('--- prev: addScripts')
217
+ const x = await addScripts()
218
+ console.log('--- value:', x)
219
+ console.log('--- after: addScripts')
216
220
 
217
221
  fireLoadListener()
218
222
  fireObserverListeners()