Skip to content

Commit 214d768

Browse files
save file
1 parent 5867238 commit 214d768

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

utils/misc/nodejs-terminal/html/snippet-nodejs/v1.0/snippet-nodejs-v1.0.html

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,7 @@
124124

125125
async function initdom(){
126126

127-
viewport = await vm.new();
128-
viewport.pos({x:250,y:200,w:850,h:500});
129-
viewport.css(`#body {display:flex;flex-direction:column}`);
130-
viewport.body.append(host);
127+
createviewport();
131128

132129
shadow = host.shadowRoot;
133130

@@ -137,12 +134,23 @@
137134
console.log(chk.persist);
138135
chk.echo = $.chkbox(shadow,'#echo');
139136

137+
$(shadow,'[value=kill]').onclick = btn.kill;
140138
$(shadow,'[value=clear]').onclick = btn.clear;
141139

142140

143141
}//initdom
144142

145143

144+
function createviewport(){
145+
146+
viewport = await vm.new();
147+
viewport.pos({x:250,y:200,w:850,h:500});
148+
viewport.css(`#body {display:flex;flex-direction:column}`);
149+
viewport.body.append(host);
150+
151+
}//createviewport
152+
153+
146154
//:
147155

148156

0 commit comments

Comments
 (0)