File tree Expand file tree Collapse file tree 1 file changed +25
-4
lines changed
blog/26-02-05/request-url-to-absolute-filename Expand file tree Collapse file tree 1 file changed +25
-4
lines changed Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments