iframe-resizer
iframe-resizer copied to clipboard
Enhancement Suggestion to doc of IFrame Resizer
In order to make the doc of IFrame Resizer more friendly to users, I'd suggest the following :
-
Add an example like this at https://github.com/davidjbradshaw/iframe-resizer#usage , otherwise lots of users didn't know how to correct use IFrame Resizer, some facts: https://stackoverflow.com/a/41890427/1485853 https://stackoverflow.com/a/41399534/1485853
-
Specify the code order so that IFrame Resizer would work correctly : (1)
<script type="text/javascript" src="./iframeResizer.min.js"></script>(2) iframe with
iframeResizer.contentWindow.min.jscontained within, for example, has<script type="text/javascript" src="./iframeResizer.contentWindow.min.js"></script>contained in the
srcdocattribute ofiframe. (3)<script type="text/javascript"> iFrameResize({ log: true }, 'iframe'); </script> -
Here states that If the other page is on a domain outside your control and you can not add JavaScript to that page, then now is the time to give up all hope of ever getting the iFrame to size to the content. As it is impossible to work out the size of the contained page, without using JavaScript on both the parent and child pages. It would be better point out that the statement is only limited to iFrame Resizer, because there are still other solutions like this https://stackoverflow.com/a/32162488/1485853
I don't think sandbox="allow-same-origin" does what you think it does