Is there way to click programatically on PayPal sdk button which is hidden in iframe? Iframe it is not ours, it comes from payPal.
Right now it brings the error:
Uncaught DOMException: Blocked a frame with origin "http://localhost:4000" from accessing a cross-origin frame.
I have tried to do
const button = document.querySelector(
#${CONTAINER_ID})?.querySelector('iframe') .contentWindow.document.querySelector('.paypal-button').click();
No, no browser JavaScript permits cross-origin operations on a domain you do not control.