]> khamidou — GitHub mirrors - electron.git/commitdiff
docs: Use file: instead of asar:
authorCheng Zhao <zcbenz@gmail.com>
Sun, 1 Feb 2015 02:48:11 +0000 (18:48 -0800)
committerCheng Zhao <zcbenz@gmail.com>
Sun, 1 Feb 2015 02:48:11 +0000 (18:48 -0800)
docs/tutorial/application-packaging.md

index a2dd5dabca151d15d23e4b133b2f57e0ef577f4a..6df917ad31d3912db8b0a1080f1257fee4b216f6 100644 (file)
@@ -69,30 +69,26 @@ require('/path/to/example.asar/dir/module.js');
 
 ### Web API
 
-In a web page, files in archive can be requested by using the `asar:` protocol.
-Like the Node API, `asar` archives are treated as directories.
+In a web page, files in archive can be requested with the `file:` protocol. Like
+the Node API, `asar` archives are treated as directories.
 
 For example, to get a file with `$.get`:
 
 ```html
 <script>
 var $ = require('./jquery.min.js');
-$.get('asar:/path/to/example.asar/file.txt', function(data) {
+$.get('file:///path/to/example.asar/file.txt', function(data) {
   console.log(data);
 });
 </script>
 ```
 
-The `asar:` protocol can also be used to request normal files in filesystem,
-just like the `file:` protocol. But unlike `file:` protocol, there are no
-slashes (`//`) after `asar:`.
-
 You can also display a web page in an `asar` archive with `BrowserWindow`:
 
 ```javascript
 var BrowserWindow = require('browser-window');
 var win = new BrowserWindow({width: 800, height: 600});
-win.loadUrl('asar:/path/to/example.asar/static/index.html');
+win.loadUrl('file:///path/to/example.asar/static/index.html');
 ```
 
 ### Treating `asar` archive as normal file