summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/feature-policy/experimental-features/resources/lazyload-contents.html
blob: a6e98c24e6add4976571141ad2409e1cce96d173 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<!DOCTYPE html>
<body>
  <p>This page is lazyloaded.</p>
  <script>
    let query_index = window.location.href.indexOf("?id=");
    let id = window.location.href.substr(query_index + 4);
    window.addEventListener("load", () => {
      let p = document.querySelector("p");
      let contents = p ? p.innerHTML : "null";
      window.parent.postMessage({"id": id, "contents": contents}, "*");
    });
  </script>
</body>