launcher/src/main/resources/org/apidesign/bck2brwsr/launcher/console.xhtml
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Sat, 15 Dec 2012 16:25:28 +0100
branchlauncher
changeset 323 d41cfd77842d
child 331 7328b7ba2fa4
permissions -rw-r--r--
Basic sketch of an HTTP server for launching bck2brwsr applications
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <!--
     3 
     4     Back 2 Browser Bytecode Translator
     5     Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     6 
     7     This program is free software: you can redistribute it and/or modify
     8     it under the terms of the GNU General Public License as published by
     9     the Free Software Foundation, version 2 of the License.
    10 
    11     This program is distributed in the hope that it will be useful,
    12     but WITHOUT ANY WARRANTY; without even the implied warranty of
    13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14     GNU General Public License for more details.
    15 
    16     You should have received a copy of the GNU General Public License
    17     along with this program. Look for COPYING file in the top folder.
    18     If not, see http://opensource.org/licenses/GPL-2.0.
    19 
    20 -->
    21 <!DOCTYPE html>
    22 <html xmlns="http://www.w3.org/1999/xhtml">
    23     <head>
    24         <title>Bck2Brwsr Launcher</title>
    25     </head>
    26     <body>
    27         <script src="bck2brwsr.js"></script>
    28         <script type="text/javascript">
    29             function ldCls(res) {
    30                 var request = new XMLHttpRequest();
    31                 request.open("GET", "classes/" + res, false);
    32                 request.send();
    33                 var arr = eval('(' + request.responseText + ')');
    34                 return arr;
    35             }
    36             var vm = new bck2brwsr(ldCls);
    37         </script>
    38         <h1>Bck2Browser Console Launcher</h1>
    39         
    40         Class Name:
    41         <input id="clazz" value="org.apidesign.bck2brwsr.launcher.Console"/>
    42         <br/>
    43         Method Name:
    44 
    45         <input id="method" value="welcome"/>
    46         <br/>
    47         
    48         <button onclick="vm.loadClass('org.apidesign.bck2brwsr.launcher.Console').execute__V();">Execute!</button>
    49         
    50         <hr/>
    51         <textarea id="result" rows="10" cols="80">
    52         </textarea>
    53     </body>
    54 </html>