Skip to content

Commit f9f2117

Browse files
save file
1 parent 1d38a7b commit f9f2117

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575

7676
var server;
7777
var test;
78+
var con;
7879

7980
var log;
8081

@@ -90,15 +91,18 @@
9091

9192
server = mod.server;
9293
test = mod.test;
94+
con = mod.console;
9395
log = mod.log;
9496

9597
server.initmod({ext,$,menu,ace,on});
9698
test.initmod({ext,$,menu,ace});
99+
con.initmod({ext,$,ace});
97100
log.initmod({ext,$});
98101

99102
await Promise.all([
100103
server.init(),
101104
test.init(),
105+
con.init(),
102106
log.init(),
103107
]);
104108

@@ -166,7 +170,7 @@
166170
{margin:20px 0;}
167171

168172
iframe
169-
{width:100%;height:300px;box-sizing:border-box;border:1px solid lightgray}
173+
{display:none;width:100%;height:300px;box-sizing:border-box;border:1px solid lightgray}
170174

171175
input
172176
{font-size:16px;padding:5px 7px;box-sizing:border-box;}
@@ -222,13 +226,13 @@ <h1 class=title>
222226

223227
<div id=btns>
224228
<input value=run type=button>
225-
<input value=msg type=button>
226229
</div>
227230

228-
<iframe></iframe>
231+
<console component v2.0 h=150>/console>
229232

230233
</div>
231234

235+
<iframe></iframe>
232236

233237
<log component v2.0></log>
234238

@@ -267,6 +271,8 @@ <h1 class=title>
267271
file = $(root,'#file');
268272
test.initdom({mode:'js',fullsize:true});
269273
$(file,'[value=run]').onclick = btn.run;
274+
con.initdom();
275+
270276
iframe = $(root,'iframe');
271277

272278
$(file,'[value=msg]').onclick = btn.msg;
@@ -285,8 +291,8 @@ <h1 class=title>
285291
var json = e.data;
286292
switch(json.type){
287293

288-
case 'log' : console.log.apply(console,json.args); break;
289-
294+
case 'log' : con.log.apply(con,args); break;
295+
290296
}//switch
291297

292298
}//onmessage

0 commit comments

Comments
 (0)