Question:
I am embedding a web page in an HTML block. The web page is dynamically generated and is designed to interact with the parent web page. I want to be able to click a link in the embedded page and have the linked-to page open in the same tab, so it doesn’t open up inside the iframe. I could used target=“_blank” but then it opens in a new tab. If I use target=“_parent”, it is blocked with a message saying the operation is forbidden. If I try to use JS to accomplish this (eg, window.parent.location.href = xyz.com) I am also blocked saying my JS cannot access the parent window. I am assuming this all is because my Wix site has a same-origin policy.
I have tried Googling on how I can make Wix allow cross-origin features but the information is quite overwhelming, and what I have seen appears to only apply to Fetch requests. I am new to Wix, and though I am an experienced coder, I am pretty weak in HTTP stuff. Any input and maybe example code would be appreciated.
Product:
Wix Editor