Browse Source

Minor doc edits and link to MDN page

Kevin Sawicki 8 years ago
parent
commit
4ce2c221c9
2 changed files with 7 additions and 5 deletions
  1. 6 4
      docs/api/protocol.md
  2. 1 1
      spec/api-protocol-spec.js

+ 6 - 4
docs/api/protocol.md

@@ -47,10 +47,11 @@ non-standard schemes can not recognize relative URLs:
   <img src='test.png'>
 </body>
 ```
-Registering a scheme as standard, will allow access of files through
-the FileSystem API. Otherwise the renderer will throw a security error for the
-scheme. So in general if you want to register a custom protocol to replace the
-`http` protocol, you have to register it as standard scheme:
+
+Registering a scheme as standard will allow access to files through the
+[FileSystem API][file-system-api]. Otherwise the renderer will throw a security
+error for the scheme. So in general if you want to register a custom protocol to
+replace the `http` protocol, you have to register it as a standard scheme:
 
 ```javascript
 const {app, protocol} = require('electron')
@@ -229,3 +230,4 @@ which sends a new HTTP request as a response.
 Remove the interceptor installed for `scheme` and restore its original handler.
 
 [net-error]: https://code.google.com/p/chromium/codesearch#chromium/src/net/base/net_error_list.h
+[file-system-api]: https://developer.mozilla.org/en-US/docs/Web/API/LocalFileSystem

+ 1 - 1
spec/api-protocol-spec.js

@@ -966,7 +966,7 @@ describe('protocol module', function () {
       })
     })
 
-    it('can access files through FileSystem API', function (done) {
+    it('can access files through the FileSystem API', function (done) {
       let filePath = path.join(__dirname, 'fixtures', 'pages', 'filesystem.html')
       const handler = function (request, callback) {
         callback({path: filePath})