15 lines
		
	
	
		
			369 B
		
	
	
	
		
			JavaScript
		
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			369 B
		
	
	
	
		
			JavaScript
		
	
	
	
| function log() {
 | |
|     $A(arguments).each(function (arg) {
 | |
| 			   $("testOutput").appendChild
 | |
| 			     (document.createTextNode(JSON.stringify(arg) + "\n"));
 | |
| 		       });
 | |
| }
 | |
| 
 | |
| function testMain() {
 | |
|     log("Starting.");
 | |
|     var testService = new JsonRpcService("/rpc/test", onReady);
 | |
|     function onReady() {
 | |
| 	testService.test_proc("Hello, world!").addCallback(log);
 | |
|     }
 | |
| }
 |