| 
									
										
										
										
											2009-07-15 07:59:37 +08:00
										 |  |  | function log() { | 
					
						
							|  |  |  |     $A(arguments).each(function (arg) { | 
					
						
							|  |  |  | 			   $("testOutput").appendChild | 
					
						
							|  |  |  | 			     (document.createTextNode(JSON.stringify(arg) + "\n")); | 
					
						
							|  |  |  | 		       }); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | function testMain() { | 
					
						
							|  |  |  |     log("Starting."); | 
					
						
							| 
									
										
										
										
											2009-07-15 19:13:16 +08:00
										 |  |  |     var testService = new JsonRpcService("/rpc/test", onReady); | 
					
						
							| 
									
										
										
										
											2009-07-15 07:59:37 +08:00
										 |  |  |     function onReady() { | 
					
						
							|  |  |  | 	testService.test_proc("Hello, world!").addCallback(log); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |