OLD | NEW |
1 #!mojo:js_content_handler | 1 #!mojo mojo:js_content_handler |
2 // Demonstrate use of the Mojo network service to load a URL. To run this | 2 // Demonstrate use of the Mojo network service to load a URL. To run this |
3 // application with mojo_shell, set DIR to be the absolute path for this | 3 // application with mojo_shell, set DIR to be the absolute path for this |
4 // directory, then: | 4 // directory, then: |
5 // mojo_shell "file://$DIR/wget.js http://www.google.com" | 5 // mojo_shell "file://$DIR/wget.js http://www.google.com" |
6 // Substitute any URL for google.com. To keep the noise down, this app | 6 // Substitute any URL for google.com. To keep the noise down, this app |
7 // only displays the number of bytes read and a little http header info. | 7 // only displays the number of bytes read and a little http header info. |
8 | 8 |
9 define("main", [ | 9 define("main", [ |
10 "console", | 10 "console", |
11 "mojo/services/public/js/application", | 11 "mojo/services/public/js/application", |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 }) | 51 }) |
52 .then(function() { | 52 .then(function() { |
53 app.quit(); | 53 app.quit(); |
54 }); | 54 }); |
55 }); | 55 }); |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 return WGet; | 59 return WGet; |
60 }); | 60 }); |
OLD | NEW |