Archived
Private
Public Access
1
0

Finished WindowAPI for the frontend

This commit is contained in:
2022-10-24 22:57:17 +02:00
parent 0fd41608b9
commit e27992ffdb
246 changed files with 1067505 additions and 39 deletions

27
WindowAPI_Test/index.html Normal file
View File

@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<iframe src="window.html" width="512" height="512" id="window-frame"></iframe>
<script>
const frame = document.getElementById('window-frame');
frame.addEventListener('load', () => {
});
window.addEventListener('message', (event) => {
if (event.origin !== new URL(frame.src).origin) return;
console.log(event.data);
frame.contentWindow.postMessage({content: 'Test Titel'}, event.origin);
}, false);
</script>
</body>
</html>