I have an iframe in a modal and my code looks like this:
<Modal>
<iframe srcdoc={data.htmlString}></iframe>
<Modal>
In that Iframe I have 3D secure payment page and it works as needed. However I want to know how to listen if user clicked on "Submit" button in that iframe after entering the code and the API was called (inside Iframe)? Because according to the answer of the API I have to redirect the user to one or other page. Is is done with eventListener? Or which parameter I should listen with in useEffect? I don't use classes, I use functions.