@xuda.io/xuda-progs-loader-module 1.0.109 → 1.0.110

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.
Files changed (2) hide show
  1. package/index.mjs +8 -7
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -30,10 +30,11 @@ export const get_doc_from_studio = async function (SESSION_ID, app_id, idP) {
30
30
  app_id,
31
31
  });
32
32
 
33
- $('body').on('live_preview_get_obj_response_' + idP, function (e, data) {
33
+ const _lp_handler = function (data) {
34
34
  resolve(data.data);
35
- $('body').off('live_preview_get_obj_response_' + idP);
36
- });
35
+ func.runtime.platform.off('live_preview_get_obj_response_' + idP, _lp_handler);
36
+ };
37
+ func.runtime.platform.on('live_preview_get_obj_response_' + idP, _lp_handler);
37
38
  }
38
39
  });
39
40
  };
@@ -54,11 +55,11 @@ export const get_doc_from_websocket = async function (SESSION_ID, app_id, idP) {
54
55
  service: 'get_doc_obj_from_build',
55
56
  data: { doc_id: idP },
56
57
  });
57
- $('body').on('get_doc_obj_from_build_response_' + idP, (e, data) => {
58
- // views_ret = data.data;
58
+ const _doc_handler = function (data) {
59
59
  resolve(data.data);
60
- $('body').off('get_doc_obj_from_build_response_' + idP);
61
- });
60
+ func.runtime.platform.off('get_doc_obj_from_build_response_' + idP, _doc_handler);
61
+ };
62
+ func.runtime.platform.on('get_doc_obj_from_build_response_' + idP, _doc_handler);
62
63
  } else {
63
64
  throw new Error('fail to fetch from ws websocket inactive');
64
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-progs-loader-module",
3
- "version": "1.0.109",
3
+ "version": "1.0.110",
4
4
  "main": "index.mjs",
5
5
  "type": "module",
6
6
  "description": "Auto-generated build for xuda-progs-loader-module.mjs",