blob: 257185805d96d2eac2faae34563e64bbc7dde408 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<!DOCTYPE html>
<html>
<head>
<script>
function processMessage(event)
{
fetch(event.data, { mode: "no-cors" }).then(() => {
parent.postMessage("ok", "*");
}, () => {
parent.postMessage("ko", "*");
});
}
window.addEventListener("message", processMessage, false);
</script>
</head>
<body>
<h3>The iframe making a same origin fetch call.</h3>
</body>
</html>
|