-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathembed.html
More file actions
46 lines (36 loc) · 889 Bytes
/
embed.html
File metadata and controls
46 lines (36 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Web IDE Embedded Content</title>
<style>
* {
transition: none;
}
body {
background-color: white;
color: black;
}
</style>
<style id="css">
</style>
</head>
<body></body>
<script>
if (localStorage.getItem("html") != document.body.innerHTML) {
document.body.innerHTML = localStorage.getItem("html");
}
if (localStorage.getItem("css") != document.getElementById("css").innerHTML) {
document.getElementById("css").innerHTML = localStorage.getItem("css");
}
try {
eval(localStorage.getItem("js"));
window.top.postMessage("No errors");
}
catch (error) {
window.top.postMessage(error);
}
</script>
</html>