Cross-origin issue while accessing to iframe content
See original GitHub issueI want to access to contentWindow of the iframe but I can’t access to the iframe element because cross-origin restrictions.
// run after loading new Question
function changed() {
console.log('New Question')
var iframe = document.querySelector(".tf-v1-widget");
console.log(iframe.getElementsByTagName("iframe")[0].contentWindow.document)
}
Is there any way via Typeform Dashboard to disable CORS-blocking restrictions for specific website or any other solution to solove this problem?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Solve the Cross-Origin Access error when working with iframes
This post will breifly explain the Cross-Origin access problem that is faced when accesing an iframe document and how you can setup your ......
Read more >how to resolve iframe cross domain issue - Stack Overflow
If the domain has explicitly blocked Cross-Origin requests, there's nothing you can do about it.
Read more >Cross-origin communication in between iframe and it's parent ...
Yes, it's not any hack or something, but with simple functions you can communicate in between iframe and it's parent website.
Read more >Same-origin policy - Web security | MDN
Cross-origin network access. The same-origin policy controls interactions between two different origins, such as when you use XMLHttpRequest ...
Read more >Cross-window communication - The Modern JavaScript Tutorial
When an iframe comes from the same origin, and we may access its document , there's a pitfall. It's not related to cross-origin...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ninja-pinky I am afraid that this is not something we support right now. Maybe we could send the form height as payload to the OnQuestionChanged event? 🤔 Would that be helpful?
Now you can use
onHeightChanged
callback. If you want to resize widget embed you can useautoResize
option.This issue was resolved in #463