From 4ce2c221c9697a147253a28eae1d99ab03760c83 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 24 Aug 2016 09:03:44 -0700 Subject: [PATCH] Minor doc edits and link to MDN page --- docs/api/protocol.md | 10 ++++++---- spec/api-protocol-spec.js | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/api/protocol.md b/docs/api/protocol.md index 7000b4f2a87..853cb6aba03 100644 --- a/docs/api/protocol.md +++ b/docs/api/protocol.md @@ -47,10 +47,11 @@ non-standard schemes can not recognize relative URLs: ``` -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 diff --git a/spec/api-protocol-spec.js b/spec/api-protocol-spec.js index 5caec616201..d831734a2bf 100644 --- a/spec/api-protocol-spec.js +++ b/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})