Skip to content

Commit 975e6e3

Browse files
save file
1 parent d7979dc commit 975e6e3

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

utils/misc/nodejs-terminal/html/webcontainer-iframe/examples/webcontainer-iframe-v1.0-example.html

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727

2828
async function init(){
2929

30-
30+
vm.initmod({mod});
31+
3132
//menu = menumod();
3233
console.log(mod);
3334

@@ -37,8 +38,10 @@
3738
log = mod['log-mod'];
3839
log.initmod({ext,$});
3940

40-
41-
await mod.auto();
41+
await Promise.all([
42+
vm.init(),
43+
mod.auto(),
44+
]);
4245

4346

4447
initdom();
@@ -57,9 +60,13 @@
5760
'js/dom/$.js.api',
5861
'js/core/datatype.js',
5962
'js/dom/menumod/menumod.js',
60-
'js/dom/keydown/keydown.js'
63+
'js/dom/keydown/keydown.js',
64+
'js/dom/viewport-manager/viewport-manager.js',
65+
6166
);
62-
[$,datatype,menumod,keydown] = await promise;
67+
[$,datatype,menumod,keydown,vm] = await promise;
68+
69+
vm = vm();
6370

6471
mod.stack.complete;
6572

@@ -95,15 +102,20 @@
95102

96103
function initdom(){
97104

105+
vm.initdom();
106+
107+
98108
$('#hdr [value=iframe]').onclick = async e=>{
99109

100110
var node = document.createElement('webcontainer-iframe');
101111
node.setAttribute('component','page');
102112
document.body.append(node);
103113
var mod2 = mod.create({mod,name:'webcontainer-iframe'});
104114
var result = await mod.build({root:node,mod:mod2});
105-
await mod2.auto();
106115
var wciframe = mod2['webcontainer-iframe'];
116+
eciframe.initmod({vm});
117+
await mod2.auto();
118+
107119

108120
};
109121

0 commit comments

Comments
 (0)