Skip to content

Commit 86ab421

Browse files
save file
1 parent a6baa70 commit 86ab421

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

blog/26-02-05/request-url-to-absolute-filename/request-url-to-absolute-filename.html

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,15 @@
4646

4747
<script>
4848
console.log('request-url-to-absolute-filename.html');
49-
49+
var editor;
50+
var snippet;
51+
52+
5053
async function ready(){
5154
debug('ready',window.crossOriginIsolated);
55+
editor = mod['web-editor'];
56+
snippet = mod['snippet-terminal-console'];
57+
5258
initdom(document.body);
5359

5460
}//init
@@ -86,6 +92,7 @@ <h1 slot=title>
8692
</p>
8793
</div>
8894

95+
<web-editor component src='ex/resolve.js' fullsize></web-editor>
8996

9097
<snippet-terminal-console component src='ex/test.js' mode=nodejs web-terminal='h=450px'></snippet-terminal-console>
9198

@@ -99,13 +106,27 @@ <h1 slot=title>
99106
<script>
100107

101108

109+
var btn = {};
110+
111+
102112
function initdom(rootnode){
113+
114+
snippet.btn.run = btn.run;
115+
103116
}//initdom
104117

105118

106-
//:
107-
108-
119+
btn.run = function(){
120+
121+
var js1 = editor.getvalue();
122+
var js2 = snippet.editor.getvalue();
123+
var js = js1+'\n\n'+js2;
124+
return js;
125+
126+
}//run
127+
128+
129+
109130
</script>
110131

111132
</html>

0 commit comments

Comments
 (0)