postmate icon indicating copy to clipboard operation
postmate copied to clipboard

How to subscribe the load event of iframe?

Open Fnxxxxo opened this issue 4 years ago • 1 comments

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.

Fnxxxxo avatar Sep 16 '20 08:09 Fnxxxxo

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.

EmanuelAguilar74 avatar Mar 06 '21 13:03 EmanuelAguilar74