The problem of adaptive height of iframe

the code is as follows:

< section class= "inner-center clearfix" >

<aside class="aside-left">
    <ul>
        <li class="act"></li>
        <li><a data-class="collect"></a></li>
        <li><a data-class="buyClass"></a></li>
    </ul>
</aside>
<main class="main"> 
    <iframe name="myiframe" id="myiframe" src="class.html" frameborder="0"  width="100%" height="100%" scrolling="no"  allowtransparency="yes" onload="setIframeHeight(this)"></iframe></main></section>
<script>
function (iframe) {
    var iframeWin = iframe.contentWindow ||         iframe.contentDocument.parentWindow;
    if (iframeWin.document.body) {
            iframe.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
        }
    }
</script>


:

question:
after writing this js function, Firefox is compatible, but Google and Sogou are not compatible. What"s going on? How to solve it?

Mar.25,2022

restrictions on browsers
do not open it in local file:// format. If you put the page on the server, the error will not be reported. windows users can debug locally through iis .

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb6911-25e6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb6911-25e6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?