Blocked a frame with origin “ionic://” from accessing a cross-origin frame

I’m trying to access an iframe in an ionic android app, but am getting the following error:

Blocked a frame with origin "ionic://" from accessing a cross-origin frame

when I try to access iframe.contentWindow.

I know that it arises from the cross origin security issue, but I need to find a way to be able to access the content inside the iframe in an android app.

Any ideas would be welcome.