@xuda.io/xuda-worker-bundle 1.3.2627 → 1.3.2628
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/index.js +10 -11
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -220,9 +220,9 @@ func.runtime.platform.emit = function (name, data) {
|
|
|
220
220
|
handlers[i](data);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
// also fire on DOM if in browser (for backward compatibility with
|
|
224
|
-
if (func.runtime.platform.has_document()
|
|
225
|
-
|
|
223
|
+
// also fire on DOM if in browser (for backward compatibility with custom event listeners)
|
|
224
|
+
if (func.runtime.platform.has_document()) {
|
|
225
|
+
document.dispatchEvent(new CustomEvent(name, { detail: Array.isArray(data) ? data : [data] }));
|
|
226
226
|
}
|
|
227
227
|
} finally {
|
|
228
228
|
func.runtime.platform._emitting[name] = false;
|
|
@@ -4376,7 +4376,8 @@ func.datasource.clean = function (SESSION_ID, screenIdP) {
|
|
|
4376
4376
|
var arr = [];
|
|
4377
4377
|
for (const [key, val] of Object.entries(SESSION_OBJ[SESSION_ID].DS_GLB)) {
|
|
4378
4378
|
try {
|
|
4379
|
-
const
|
|
4379
|
+
const _screen_el = val.screenId ? document.getElementById(val.screenId) : null;
|
|
4380
|
+
const screen_parent_id = _screen_el?.parentElement?.id || null;
|
|
4380
4381
|
if (
|
|
4381
4382
|
Number(key) > 0 &&
|
|
4382
4383
|
(val.screenId === screenIdP ||
|
|
@@ -4471,13 +4472,11 @@ func.datasource.del = function (SESSION_ID, dsP) {
|
|
|
4471
4472
|
}
|
|
4472
4473
|
}
|
|
4473
4474
|
}
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
delete ds_obj[dsP];
|
|
4480
|
-
}
|
|
4475
|
+
const _nav_node = func.runtime.ui.get_first_node(SESSION_OBJ[SESSION_ID].root_element)?.querySelector?.('xu-nav');
|
|
4476
|
+
if (_nav_node) {
|
|
4477
|
+
var ds_obj = func.runtime.ui.get_data(_nav_node)?.xuData?.nav_params;
|
|
4478
|
+
if (ds_obj) {
|
|
4479
|
+
delete ds_obj[dsP];
|
|
4481
4480
|
}
|
|
4482
4481
|
}
|
|
4483
4482
|
}
|