window.parentIFrame no longer being set?
See original GitHub issueHi David, I’ve been using (and loving!) iframe-resizer for about a year now. Suddenly I’ve noticed something really weird: it looks like window.parentIFrame
isn’t being set on the parent window at all – not even on your example page. Only noticed this because an if('parentIFrame' in window)
type check has begun failing, without there being any code change on my side. This seems to be happening from anywhere I test, so I don’t think it’s a local issue either. Am I crazy?
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (4 by maintainers)
Top Results From Across the Web
Why is this object unaccesible? - Stack Overflow
I don't know why but the reason window.parentIFrame is undefined is because it isn't available immediately after the page is loaded.
Read more >iFrame Resizer - GitHub Pages
When enabled changes to the Window size or the DOM will cause the iFrame to resize to the new content size. Disable if...
Read more >Window.parent - Web APIs | MDN
The Window.parent property is a reference to the parent of the current window or subframe. If a window does not have a parent,...
Read more >iframe-resizer - npm
v2.6.1 #91 Fixed issue with jQuery version requiring empty object if no options are being set. v2.6.0 Added parentIFrame.scrollTo() method.
Read more >Adding FitMetrix Pages to Your Site Using Godaddy
The Add Page window displays in the Navigation Bar. AddPageWindow ... position, window.parentIFrame not found"):b()}function A(){!1!==
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 FreeTop 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
Top GitHub Comments
Since v3 there is no need to set that option.
You also don’t need the messageCallback.
Had same problem with missing window.parentIFrame. Found out, that I needed to set enablePublicMethods: true for iFrameResize in the parent window like this:.
iFrameResize({
log : true,
checkOrigin: false,
enablePublicMethods : true,
messageCallback : function(messageData){
if('Reload' === messageData.message){
location.href = location.href;
}
}
});