8000 feat: Inform when dataproxy is ready by paultranvan · Pull Request #28 · cozy/cozy-web-data-proxy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Inform when dataproxy is ready #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: Inform when dataproxy is ready #28

wants to merge 1 commit into from

Conversation

paultranvan
Copy link
Contributor

Parent apps need a way to knwo when the DataProxy is ready to be requested.
Otherwise, errors could occur because the init is not done.

Parent apps need a way to knwo when the DataProxy is ready to be
requested.
Otherwise, errors could occur because the init is not done.
Comment on lines +33 to +40
const sendReadyMessage = (): void => {
// This is useful to inform the parent apps that the DataProxy's iframe is ready to be requested
window.parent.postMessage(
{ type: 'DATAPROXYMESSAGE', payload: 'READY' },
'*'
)
}

Copy link
Member

Choose a reason for hiding this comment

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

nit: this can be easily moved outside of the react component for better readability.

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.

2 participants
0