Skip to content
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

How to subscribe the load event of iframe? #204

Open
Fnxxxxo opened this issue Sep 16, 2020 · 1 comment
Open

How to subscribe the load event of iframe? #204

Fnxxxxo opened this issue Sep 16, 2020 · 1 comment

Comments

@Fnxxxxo
Copy link

Fnxxxxo commented Sep 16, 2020

What Is the issue?

Are there any way to get the irame element after init of postmate? I need to check if the content document is ready. In case of 404 and 500, I can not relay on the customized load event from the child.

Provide issue context below using code examples, images, or links

Maybe add a load event callback when init postmate?

new Postmate({
  onload: () => {}
})

Read about references issues here. Provide paragraph text responses to each header.

@EmanuelAguilar74
Copy link

new Postmate() returns a promise, you can use ".then( child => child)" or ".catch()" for the errors I suppose.
The child object has an iframe property inside.

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

No branches or pull requests

2 participants