windowRef: {
addEventListener: ((_name, eventCallback) => void);
location: {
origin: string;
};
postMessage: ((message, _target?) => void);
removeEventListener: ((_name, eventCallback) => void);
}
Type declaration
-
addEventListener: ((_name, eventCallback) => void)
-
- (_name, eventCallback): void
-
Parameters
-
_name: string
-
eventCallback: Callback
Returns void
-
location: {
origin: string;
}
-
postMessage: ((message, _target?) => void)
-
- (message, _target?): void
-
Parameters
-
message: string | Record<string, unknown>
-
Optional
_target: string
Returns void
-
removeEventListener: ((_name, eventCallback) => void)
-
- (_name, eventCallback): void
-
Parameters
-
_name: string
-
eventCallback: Callback
Returns void
A mock for postmessage if run in node.js environment