Archived
Private
Public Access
1
0

Initial commit

This commit is contained in:
2022-09-04 12:45:01 +02:00
commit f4a01d6a69
11601 changed files with 4206660 additions and 0 deletions

5
HTML/IframeCommunication/.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,5 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectDictionaryState">
<dictionary name="leon" />
</component>
</project>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="PROJECT_FILES" />
<option name="description" value="" />
</component>
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/IframeCommunication.iml" filepath="$PROJECT_DIR$/.idea/IframeCommunication.iml" />
</modules>
</component>
</project>

6
HTML/IframeCommunication/.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Inner IFrame</title>
</head>
<body>
<h1>Hello World</h1>
<p></p>
<script>
window.addEventListener('message', (event) => {
const element = document.querySelector("p");
element.innerText = JSON.stringify(event.data);
}, false);
parent.postMessage("Fick die hänne", '*');
</script>
</body>
</html>

View File

@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Iframe Communication</title>
</head>
<body>
<iframe name="frame" width="1000" height="1000"></iframe>
<script>
window.open("iframe.html", "frame");
const windowProperties = {
title: "Test Window",
headerMessage: "Header Message",
icon: "image.png",
resizable: true,
size: {width: 500, height: 600},
minSize: {width: 500, height: 600},
position: {x: 50, y: 200},
htmlWindowRef: undefined,
htmlContentRef: undefined,
windowRef: undefined,
headerActions: [],
windowType: undefined,
dialog: {open: false},
};
window.onload = () => {
const frame = document.querySelector("iframe");
frame.contentWindow.postMessage(windowProperties, location.origin); // Iframe Origin
};
window.addEventListener('message', (event) => {
console.log(event);
}, false);
</script>
</body>
</html>