Skip to content

Commit 4d94ec7

Browse files
2 file edited, 1 file deleted
1 parent f4f996b commit 4d94ec7

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

Obbiettivo.png

-36.2 KB
Binary file not shown.

docs/index.html

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
mover.changeX(50);
3737
mover.changeY(50);
38-
</textarea>
38+
</textarea>
3939
<div hidden style="background-color: white;width: -webkit-fill-available;height: max-content;resize: vertical;overflow-clip-margin: content-box !important;overflow: clip !important;border-width: 2px;border-style: inset;border-color: initial;border-image: initial;">
4040
<div id="movable" style="width: 50px; position: relative; height: 50px; background-color: blue;"></div>
4141
<div id="movable2" style="width: 50px; position: relative; left: 0; top: 0; height: 50px; background-color: red;"></div>
@@ -46,9 +46,25 @@
4646
</html>
4747

4848
<script>
49-
document.getElementById('iframe').innerHTML = `
50-
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Movement-library.js</title></head><body><div id="movable" style="width: 50px; position: absolute; height: 50px; background-color: blue;"></div><div id="movable2" style="width: 50px; position: absolute; left: 0; top: 0; height: 50px; background-color: red;"></div><script src="/core/Movement-library.js"></script><script src="/core/example.js"></script></body></html>
51-
`;
49+
const iframe = document.getElementById('iframe');
50+
iframe.contentDocument.open();
51+
iframe.contentDocument.write(`
52+
<!DOCTYPE html>
53+
<html lang="en">
54+
<head>
55+
<meta charset="UTF-8">
56+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
57+
<title>Movement-library.js</title>
58+
</head>
59+
<body>
60+
<div id="movable" style="width: 50px; position: absolute; height: 50px; background-color: blue;"></div>
61+
<div id="movable2" style="width: 50px; position: absolute; left: 0; top: 0; height: 50px; background-color: red;"></div>
62+
<script src="/core/Movement-library.js"></script>
63+
<script src="/core/example.js"></script>
64+
</body>
65+
</html>
66+
`);
67+
iframe.contentDocument.close();
5268
</script>
5369

5470
<script>

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<!DOCTYPE html>
22
<script>
3-
window.location.href = '/docs/test.html'
3+
window.location.href = '/docs/index.html'
44
</script>

0 commit comments

Comments
 (0)