@yuneta/gobj-ui 7.23.47 → 7.23.48

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.
@@ -67150,6 +67150,7 @@ function yui_asset_element(answer, opts = {}) {
67150
67150
  }
67151
67151
  el.src = src;
67152
67152
  el.onerror = () => {
67153
+ (0, _yuneta_gobj_js.log_error)(`asset could not be loaded: ${opts.detail || src}`);
67153
67154
  const $marker = yui_asset_missing(opts.detail, opts);
67154
67155
  if (el.parentNode) el.parentNode.replaceChild($marker, el);
67155
67156
  };
@@ -67145,6 +67145,7 @@ function yui_asset_element(answer, opts = {}) {
67145
67145
  }
67146
67146
  el.src = src;
67147
67147
  el.onerror = () => {
67148
+ log_error(`asset could not be loaded: ${opts.detail || src}`);
67148
67149
  const $marker = yui_asset_missing(opts.detail, opts);
67149
67150
  if (el.parentNode) el.parentNode.replaceChild($marker, el);
67150
67151
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuneta/gobj-ui",
3
- "version": "7.23.47",
3
+ "version": "7.23.48",
4
4
  "type": "module",
5
5
  "main": "dist/gobj-ui.cjs.js",
6
6
  "module": "dist/gobj-ui.es.js",
package/src/yui_asset.js CHANGED
@@ -16,7 +16,7 @@
16
16
  */
17
17
 
18
18
  import {
19
- createElement2
19
+ createElement2, log_error
20
20
  } from "@yuneta/gobj-js";
21
21
 
22
22
  import "./yui_asset.css";
@@ -177,6 +177,16 @@ function yui_asset_element(answer, opts = {})
177
177
  * silent gap this module was written to stop.
178
178
  */
179
179
  el.onerror = () => {
180
+ /*
181
+ * And it is REPORTED, not only drawn. The marker tells the person
182
+ * looking at the screen; log_error is what reaches the yuno, which
183
+ * is the only place anybody can count how often it happens. An
184
+ * asset the backend served and the browser could not load is a
185
+ * fact of the system -- an expired signature, a blob gone from the
186
+ * store, a codec nobody has -- and a failure only a user can see
187
+ * is a failure nobody measures.
188
+ */
189
+ log_error(`asset could not be loaded: ${opts.detail || src}`);
180
190
  const $marker = yui_asset_missing(opts.detail, opts);
181
191
  if(el.parentNode) {
182
192
  el.parentNode.replaceChild($marker, el);