Skip to content

Commit ec04acf

Browse files
save file
1 parent 7ecb5d1 commit ec04acf

1 file changed

Lines changed: 30 additions & 2 deletions

File tree

utils/misc/nodejs-terminal/html/webcontainer-iframe/webcontainer-iframe.html

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{display:flex;flex-direction:column;border:1px solid lightgray;box-sizing:border-box;border-radius:10px;background:whitesmoke}
99

1010
#hdr
11-
{display:flex;align-items:center}
11+
{display:flex;align-items:center;gap:10px}
1212

1313
#url
1414
{flex:1}
@@ -78,7 +78,14 @@
7878
//:
7979

8080

81-
81+
var ui = {};
82+
ui.url = null;
83+
84+
85+
86+
var ku = {};
87+
88+
8289
//:
8390

8491

@@ -94,9 +101,30 @@
94101
var shadow = host.shadowRoot;
95102

96103

104+
ui.url = $(shadow,'#url');
105+
ui.url.onkeyup = ku.url;
106+
107+
ui.iframe = $(shadow,'iframe');
108+
109+
110+
111+
97112
}//initdom
98113

99114

115+
//:
116+
117+
118+
ku.url = function(e){
119+
120+
switch(e.key){
121+
122+
case 'Enter' : iframe.src = ui.url.value; break;
123+
124+
}//switch
125+
126+
}//url
127+
100128

101129
//:
102130

0 commit comments

Comments
 (0)