I’m trying to add a button in an HTML block in my blog post:
.button { background-color: #9C7C38; color: white; border: none; padding: 10px 20px; text-align: center; font-family: 'Arial'; } GoI get the following messages in the console:
“Unsafe JavaScript attempt to initiate navigation for frame with origin ‘https://social-blog.wix.com’ from frame with URL ‘https://static.parastorage.com/unpkg/@wix/communities-blog-rce@1.0.297/dist/statics/html-plugin-embed.html’. The frame attempting navigation is neither same-origin with the target, nor is it the target’s parent or opener.”
Uncaught DOMException: Failed to set the ‘href’ property on ‘Location’: The current window does not have permission to navigate the target frame to ‘https://www.w3docs.com’.
at HTMLButtonElement.onclick (https://static.parastorage.com/unpkg/@wix/communities-blog-rce@1.0.297/dist/statics/html-plugin-embed.html:1:1787)
onclick @ html-plugin-embed.html:1
If I use window.location.href = instead the window.parent.location.href = , the link opens but inside the same HTML frame.
What do I do wrong? Thank you.