Skip to content

Conversation

mehimanshupatil
Copy link

added optional parameter window for defineWindowMessaging sendMessage function

fixes #90

so currently Window Messaging works by sending message on window but the reference of window object is based on which window you want to send message to.
like for sending message from injected code in iframe you need to refer window.parent and not window

added optional parameter window for defineWindowMessaging
* by default global window is used to send mesage
*/
export type WindowSendMessageArgs = [targetOrigin?: string];
export type WindowSendMessageArgs = [targetOrigin?: string, targetWindow?: Window];
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can have kept targetWindow first and then targetOrigin but don't this to be released as major version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[messaging] How to communicate with an iFrame?
1 participant