summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/support/iframe_sandbox_027.htm
blob: c1a48cdef9bfec1ffdb9d83abc51571007b29b39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE html>
<html>
<head><title>XMLHttpRequest</title>
</head>
<body>
    <script type="text/javascript">
        xhrRequest = new XMLHttpRequest();

        xhrRequest.onreadystatechange = function () {
            if (xhrRequest.readyState == 4 && xhrRequest.status == 200) {
            //xhr successful
            parent.window.postMessage("access to window.XMLHttpRequest", "*");
            }
        }

        xhrRequest.open("GET", "standalone-pass.htm", true);
        xhrRequest.send();

    </script>
</body>
</html>