mercredi 31 juillet 2019

JavaScript component to handle closing of cross-domain tabs

I want to use window.open and emit an event with the reference to the opened window.

A specific component will have to listen for this event and store the reference to the last opened window. The component will also have to listen for a "close" event coming from the child window through the PostMessage API and close it using the last stored reference.

How can I implement this component in an elegant way following best practices and design patterns?

Aucun commentaire:

Enregistrer un commentaire