910e62b5创建于 1月15日历史提交
<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="width=device-width,minimum-scale=1">
    <title>Positioned Iframe Test Case</title>
    <style>
      /* Position the iframe in the bottom right quadrant of the viewport */
      iframe {
        position: absolute;
        width: 50vw;
        height: 50vh;
        bottom: 0;
        right: 0;
        border: solid black 1px;
      }
    </style>
  </head>
  <iframe id="iframe"></iframe>
  <script>
    // Browser tests manually navigate the subframe. For manual reproduction
    // locally append ?path=<path-to-file> to the URL.
    const params = new URLSearchParams(location.search.substr(1));
    const path = params.get('path');
    if (path) {
      document.getElementById('iframe').src = path;
    }

    function wait(){
      return new Promise((resolve, reject)=>{
        setTimeout(()=>{
          resolve();
        }, 500);
      })
    }
  </script>
</html>