davidjbradshaw/iframe-resizer

Adding the iframeResizer.contentWindow.js script inside another js file gives yh is not defined error on console

mariappan-subramanian opened this issue · 1 comments

Describe the bug
I'm adding the contentWindow.js script dynamically to the child iframe. Import the entire script and adding it to another script which in turn added to the iframe.

To Reproduce

Adding this snippet inside of my index.js

import initIframeResizer from 'iframe-resizer/js/iframeResizer.contentWindow.js';
....

 // initialize the iframeResizer contentWindow
          initIframeResizer();

Expected behavior
Need to resize as expected

It works, but getting the error in the below screenshot

Screenshots
Screenshot 2022-09-29 at 12 47 32 PM

Additional context
Not able to understand why this error is being popped out in the console. There is a function call yh() in my generated script after adding contentWindow script. Verified it's adding only after adding the source.

Any idea why this error is being logged & how can I get rid of it/things to ensure.

No idea