iframe.io 1.0.6 → 1.2.0

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/dist/index.d.ts CHANGED
@@ -10,6 +10,16 @@ export type Options = {
10
10
  maxMessagesPerSecond?: number;
11
11
  autoReconnect?: boolean;
12
12
  messageQueueSize?: number;
13
+ /**
14
+ * Optional allowlist of incoming application-level events.
15
+ * Reserved internal events (ping/pong/heartbeats) are always allowed.
16
+ */
17
+ allowedIncomingEvents?: string[];
18
+ /**
19
+ * Optional custom validator for incoming messages.
20
+ * Return false to drop a message; an 'error' event will be emitted.
21
+ */
22
+ validateIncoming?: (event: string, payload: any, origin: string) => boolean;
13
23
  };
14
24
  export interface RegisteredEvents {
15
25
  [index: string]: Listener[];