@xuda.io/xuda-worker-bundle 1.3.2621 → 1.3.2623

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.js +13 -9
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -278,8 +278,9 @@ func.runtime.platform.set_title = function (title) {
278
278
  }
279
279
  };
280
280
  func.runtime.platform.set_cursor = function (element, cursor) {
281
- if (typeof $ !== 'undefined' && element) {
282
- $(element).css('cursor', cursor);
281
+ const node = func.runtime.ui?.get_first_node ? func.runtime.ui.get_first_node(element) : element;
282
+ if (node?.style) {
283
+ node.style.cursor = cursor;
283
284
  }
284
285
  };
285
286
 
@@ -2000,10 +2001,12 @@ func.common.get_data_from_websocket = async function (SESSION_ID, serviceP, data
2000
2001
  } else {
2001
2002
  if (RUNTIME_SERVER_WEBSOCKET && RUNTIME_SERVER_WEBSOCKET_CONNECTED) {
2002
2003
  RUNTIME_SERVER_WEBSOCKET.emit('message', obj);
2003
- $('body').on('get_ws_data_response_' + glb.websocket_queue_num, (e, data) => {
2004
+ const _ws_event = 'get_ws_data_response_' + glb.websocket_queue_num;
2005
+ const _ws_handler = function (data) {
2004
2006
  resolve(data.data);
2005
- $('body').off('get_ws_data_response_' + data.e.websocket_queue_num);
2006
- });
2007
+ func.runtime.platform.off('get_ws_data_response_' + data.e.websocket_queue_num, _ws_handler);
2008
+ };
2009
+ func.runtime.platform.on(_ws_event, _ws_handler);
2007
2010
  } else {
2008
2011
  throw new Error('fail to fetch from ws websocket inactive');
2009
2012
  }
@@ -2017,10 +2020,11 @@ func.common.get_data_from_websocket = async function (SESSION_ID, serviceP, data
2017
2020
 
2018
2021
  if (RUNTIME_SERVER_WEBSOCKET && RUNTIME_SERVER_WEBSOCKET_CONNECTED) {
2019
2022
  RUNTIME_SERVER_WEBSOCKET.emit('message', obj);
2020
- $('body').on('heartbeat_response', (e, data) => {
2023
+ const _hb_handler = function (data) {
2021
2024
  resolve(data.data);
2022
- $('body').off('heartbeat_response');
2023
- });
2025
+ func.runtime.platform.off('heartbeat_response', _hb_handler);
2026
+ };
2027
+ func.runtime.platform.on('heartbeat_response', _hb_handler);
2024
2028
  } else {
2025
2029
  throw new Error('fail to fetch from ws websocket inactive');
2026
2030
  }
@@ -7572,7 +7576,7 @@ func.events.execute = async function (
7572
7576
  var field_elm = elementP;
7573
7577
 
7574
7578
  var calling_field_id = field_elm;
7575
- if (field_elm && typeof field_elm === 'object') calling_field_id = field_elm.attr('xu-ui-id');
7579
+ if (field_elm && typeof field_elm === 'object') calling_field_id = func.runtime.ui.get_attr(field_elm, 'xu-ui-id');
7576
7580
 
7577
7581
  var log_nodeId;
7578
7582
  var log_prog_id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle",
3
- "version": "1.3.2621",
3
+ "version": "1.3.2623",
4
4
  "description": "xuda framework",
5
5
  "main": "index.js",
6
6
  "scripts": {