MyAlgo wallet getting a cross-origin error

Hey guys. So I’m ashamed to admit but I’ve been trying to hack the myalgo wallet into PHP.

I’m currently getting the popup to load and try and connect to However I then immediately get a browser cross-origin error:

Uncaught (in promise) DOMException: Blocked a frame with origin “http://localhost” from accessing a cross-origin frame.

Would anyone be able to shed some light on how I can get around this? How does the myalgo wallet avoid cross-origin issues? Am I wasting my time trying to port this into PHP?
Any help would be appreciated. Thanks

Welcome to Algorand!

For MyAlgo-related questions, it is often faster to ask on the Discord server, channel #myalgo

Try it from your website.

Hey thanks for the invite. I’ll try there.

Normally, scripts on different pages are allowed to access each other if and only if the pages they originate from share the same protocol, port number, and host. Above error message shows that you can’t access an < iframe > with different origin using JavaScript/jQuery, it would be a huge security flaw if you could do it.

window.postMessage() provides a controlled mechanism to securely circumvent this restriction.