@lvce-editor/renderer-process 9.3.0 → 9.4.1

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.
@@ -1991,7 +1991,7 @@ var attachEvent$1 = ($Node, eventMap, key, value) => {
1991
1991
  console.warn("listener not found", value);
1992
1992
  return;
1993
1993
  }
1994
- const options = getEventListenerOptions$1(eventMap);
1994
+ const options = getEventListenerOptions$1(key);
1995
1995
  const wrapped = getWrappedListener$1(listener, eventMap.returnValue);
1996
1996
  $Node.addEventListener(key, wrapped, options);
1997
1997
  };
@@ -11353,7 +11353,7 @@ const setPort = (state, portId, origin) => {
11353
11353
  // TODO wait for load in renderer worker
11354
11354
  // TODO avoid closure
11355
11355
  // TODO use jsonrpc invoke
11356
- frame.addEventListener('load', () => {
11356
+ const handleLoad = () => {
11357
11357
  const {
11358
11358
  contentWindow
11359
11359
  } = frame;
@@ -11362,6 +11362,9 @@ const setPort = (state, portId, origin) => {
11362
11362
  method: 'setPort',
11363
11363
  params: [port]
11364
11364
  }, origin, [port]);
11365
+ };
11366
+ frame.addEventListener('load', handleLoad, {
11367
+ once: true
11365
11368
  });
11366
11369
  };
11367
11370
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "9.3.0",
3
+ "version": "9.4.1",
4
4
  "description": "",
5
5
  "main": "dist/diffWorkerMain.js",
6
6
  "type": "module",