Skip to content

Commit b526909

Browse files
save file
1 parent 0fd6cac commit b526909

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

blog/25-07-23/http2-server/http2-server.html

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
;
6060

6161

62+
var ace;
63+
6264
var ext;
6365
var $;
6466
var datatype;
@@ -67,10 +69,9 @@
6769
var code;
6870
var debug;
6971

70-
var ace;
71-
7272
var menu;
73-
73+
74+
var hdr;
7475
var editor;
7576

7677

@@ -80,14 +81,18 @@
8081
async function init(){
8182
//debug('init',version);
8283

83-
menu = menumod();
84-
84+
menu = menumod();
8585

86-
editor = mod.editor;
86+
hdr = mod['blog-hdr'];
87+
editor = mod['web-editor'];
8788

89+
hdr.initmod({ext,$});
8890
editor.initmod({ext,$,menu,ace});
8991

90-
await editor.init();
92+
await Promise.all([
93+
hdr.init(),
94+
editor.init(),
95+
]);
9196

9297

9398
initdom(document.body);
@@ -198,7 +203,7 @@
198203
<body>
199204

200205

201-
<blog-hdr component=grp1 v2.0>
206+
<blog-hdr component=grp1>
202207
<h1 class=title>
203208
how to set up HTTP/2 server in Node.js
204209
</h1>
@@ -258,8 +263,7 @@ <h1 class=title>
258263
<input value=download type=button>
259264
</div>
260265

261-
<editor component v2.0 src='ex/ex1.js'>
262-
</editor>
266+
<web-editor component v2.0 src='ex/ex1.js'></web-editor>
263267

264268

265269
</div>
@@ -281,6 +285,9 @@ <h1 class=title>
281285
$('[value=download]').onclick = btn.download;
282286

283287

288+
hdr.initdom();
289+
290+
284291
editor.initdom(rootnode,{fullsize:true});
285292

286293

0 commit comments

Comments
 (0)