Skip to content

Commit b383fc0

Browse files
save file
1 parent 3f3bfba commit b383fc0

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
3+
<style>
4+
5+
html
6+
{font-family:arial}
7+
8+
</style>
9+
10+
<body>
11+
12+
<h3>index.html</h3>
13+
14+
</body>
15+
16+
17+
<script>
18+
19+
(()=>{
20+
21+
var console = {};
22+
console.log = (...args)=>window.parent.postMessage({type:'log',args},'*');
23+
24+
window.onmessage = e=>{
25+
//window.console.log('rec',e.data);
26+
var json = e.data;
27+
switch(json.type){
28+
29+
case 'run' : run(json.js); break;
30+
31+
}//switch
32+
33+
}//onmessage
34+
35+
36+
function run(js){
37+
38+
eval(js);
39+
40+
}//run
41+
42+
})();
43+
44+
</script>
45+
46+
47+
48+

0 commit comments

Comments
 (0)