diff options
Diffstat (limited to 'mojo/apps/js/main.js')
-rw-r--r-- | mojo/apps/js/main.js | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/mojo/apps/js/main.js b/mojo/apps/js/main.js index c8eaac5..e2562cf 100644 --- a/mojo/apps/js/main.js +++ b/mojo/apps/js/main.js @@ -22,19 +22,24 @@ define("test", [ ], function(core, connection, support, net, loader, mojo, console) { var netServiceHandle = mojo.connectToService( - "mojo:mojo_network_service", "mojo::NetworkService"); + "mojo:mojo_network_service", net.NetworkService.name); var netConnection = new connection.Connection( - netServiceHandle, net.NetworkServiceStub, net.NetworkServiceProxy); + netServiceHandle, + net.NetworkService.stubClass, + net.NetworkService.proxyClass); - var urlLoaderPipe = new core.createMessagePipe(); + var urlLoaderPipe = core.createMessagePipe(); netConnection.remote.createURLLoader(urlLoaderPipe.handle1); var urlLoaderConnection = new connection.Connection( - urlLoaderPipe.handle0, loader.URLLoaderStub, loader.URLLoaderProxy); + urlLoaderPipe.handle0, + loader.URLLoader.stubClass, + loader.URLLoader.proxyClass); - var urlRequest = new loader.URLRequest(); - urlRequest.url = "http://www.cnn.com"; - urlRequest.method = "GET"; - urlRequest.auto_follow_redirects = true; + var urlRequest = new loader.URLRequest({ + url: "http://www.cnn.com", + method: "GET", + auto_follow_redirects: true + }); var urlRequestPromise = urlLoaderConnection.remote.start(urlRequest); urlRequestPromise.then(function(result) { |