Skip to content

Commit de41e50

Browse files
save file
1 parent 122a0d5 commit de41e50

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

blog/25-07-25/http-streaming-download/ex/srcdoc.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,35 @@
1111

1212
</body>
1313

14+
<script>
15+
16+
(()=>{
17+
18+
var console = {};
19+
console.log = (...args)=>{window.parent.postMessage({type:'log',args},'*');window.console.log.apply(window.console,args)};
20+
21+
window.onmessage = e=>{
22+
23+
var json = e.data;
24+
switch(json.type){
25+
26+
case 'run' : run(json.js); break;
27+
28+
}//switch
29+
30+
}//onmessage
31+
32+
33+
function run(js){
34+
35+
eval(js);
36+
37+
}//run
38+
39+
})();
40+
41+
</script>
42+
1443

1544

1645

0 commit comments

Comments
 (0)