Home › Forums › General Questions › How to communicate between v3d iframe and other HTML pages?
Tagged: Html
- This topic has 3 replies, 2 voices, and was last updated 10 months ago by kdv.
-
AuthorPosts
-
2024-01-20 at 2:40 pm #69824LeeCustomer
Hi, When I embed a v3d code in my webflow project and try to host them on our own hosting server (with HTML, CSS, Javascript exported), it throws me an error saying ”
DOMException: Failed to read a named property ‘document’ from ‘Window’: Blocked a frame with origin “https://cdn.soft8soft.com” from accessing a cross-origin frame.”This seems happens because I am not hosting custom html and javascript files on the verge3d network, but on my own hosting server (like ecommerce platform like shopify), it gives me Same-Origin Policy error. Accrording to Stackoverflow, they suggested a workaround this issue by using window.postMessage and window.eventlistener to avoid this iframe-cross domain access issues.
I assume that verge3d’s wordpress plugin encapsulated this approach already in the plugin source code to allow them to be hosted on custom hosting server.
Do we have any guide or step by step approach how to add this workaround in our both sides (one for main page, the other for in the iframe)? Or any other suggestion here?
For your reference, another web-based 3d configurator service called Vectary provides this ModelAPI so that users can easily make them communicate without barrier by adding this code “listenToChangesFromModel(); listenToChangesFromUI();0”
https://help.vectary.com/custom-code
Thanks for your help and techniques in advance.
Attachments:
You must be logged in to view attached files.2024-01-20 at 2:53 pm #69826kdvParticipantBlocked a frame with origin “https://cdn.soft8soft.com” from accessing a cross-origin frame.
Why are you loading the app’s files from soft8soft.com? Can’t you upload them to your server? It will solve your problem.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-01-20 at 4:22 pm #69834LeeCustomerThank you Kdv for the quick answers!
Let me try as you suggested.Just one clarification by the way. My FTP server doesn’t support file type like .blender and .gltf but only support like html, css, and javascript..
Would it still work when we upload app’s files without those files?
2024-01-20 at 4:27 pm #69835kdvParticipantWithout .blend files – yes (they are not needed at all when running WebGL apps), without .gltf/.bin – NO.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
-
AuthorPosts
- You must be logged in to reply to this topic.