kkrpc 0.0.13 → 0.0.14

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.
@@ -375,7 +375,7 @@ var IframeParentIO = class {
375
375
  constructor(targetWindow) {
376
376
  this.targetWindow = targetWindow;
377
377
  this.port = null;
378
- globalThis.addEventListener("message", (event) => {
378
+ window.addEventListener("message", (event) => {
379
379
  if (event.source !== this.targetWindow) return;
380
380
  if (event.data === PORT_INIT_SIGNAL && event.ports.length > 0) {
381
381
  this.port = event.ports[0];
@@ -443,7 +443,7 @@ var IframeChildIO = class {
443
443
  this.channel = new MessageChannel();
444
444
  this.port = this.channel.port1;
445
445
  this.port.onmessage = this.handleMessage;
446
- globalThis.parent.postMessage(PORT_INIT_SIGNAL, "*", [this.channel.port2]);
446
+ window.parent.postMessage(PORT_INIT_SIGNAL, "*", [this.channel.port2]);
447
447
  this.initialized = Promise.resolve();
448
448
  }
449
449
  handleMessage = (event) => {
@@ -29,7 +29,7 @@ var IframeParentIO = class {
29
29
  constructor(targetWindow) {
30
30
  this.targetWindow = targetWindow;
31
31
  this.port = null;
32
- globalThis.addEventListener("message", (event) => {
32
+ window.addEventListener("message", (event) => {
33
33
  if (event.source !== this.targetWindow) return;
34
34
  if (event.data === PORT_INIT_SIGNAL && event.ports.length > 0) {
35
35
  this.port = event.ports[0];
@@ -97,7 +97,7 @@ var IframeChildIO = class {
97
97
  this.channel = new MessageChannel();
98
98
  this.port = this.channel.port1;
99
99
  this.port.onmessage = this.handleMessage;
100
- globalThis.parent.postMessage(PORT_INIT_SIGNAL, "*", [this.channel.port2]);
100
+ window.parent.postMessage(PORT_INIT_SIGNAL, "*", [this.channel.port2]);
101
101
  this.initialized = Promise.resolve();
102
102
  }
103
103
  handleMessage = (event) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kkrpc",
3
3
  "module": "index.ts",
4
- "version": "0.0.13",
4
+ "version": "0.0.14",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
@@ -25,10 +25,10 @@
25
25
  "@types/ws": "^8.5.13",
26
26
  "tslib": "^2.8.1",
27
27
  "tsup": "^8.3.5",
28
- "typedoc": "^0.26.11"
28
+ "typedoc": "^0.27.6"
29
29
  },
30
30
  "peerDependencies": {
31
- "typescript": "^5.6.3"
31
+ "typescript": "^5.0.0"
32
32
  },
33
33
  "dependencies": {
34
34
  "ws": "^8.18.0"