davidjbradshaw/iframe-resizer

Angular external url, resizing not working but height is being logged

sanderschnydrig opened this issue · 1 comments

Describe the bug
On a domain that is not ours I can't get the iframe to resize but I do get the desired height in the logs.
I have been following this thread on the Angular implementation but without success so far: #478

To Reproduce

  1. In an Angular application add an iframe with the following src: https://datawrapper.dwcdn.net/j7OTd/46/

Expected behavior
I can't seem to be able to inject assets/js/iframeResizer.contentWindow.js into this external URL that does not belong to any of our own servers. As a result, the resizer doesn't work. I do however get the desired height (428px) in the logs (below).

Is there a way I can extract this value from the logs so I can manually set the height of the iframe?

Screenshots
Logs:

[iFrameSizer][Host page: null] Ignored: {"src":"https://datawrapper.dwcdn.net/j7OTd/46/","context":"iframe.resize","height":428}

Desktop (please complete the following information):

  • OS: Mac OS 12.1
  • Browser Firefox
  • Version 95.0.2

I think this is a question for Stack Overflow, I have never done anything with Angular