question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

window.parentIFrame no longer being set?

See original GitHub issue

Hi 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:closed
  • Created 7 years ago
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
davidjbradshawcommented, Apr 20, 2017

Since v3 there is no need to set that option.

You also don’t need the messageCallback.

1reaction
JohnBergAndersencommented, Apr 20, 2017

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; } } });

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found