Revert "add docs"

This reverts commit bdfc19ad20.
This commit is contained in:
Cheng Zhao 2016-02-24 13:25:22 +08:00
parent 820c72af55
commit bb1e4c2208
3 changed files with 9 additions and 29 deletions

View file

@ -523,25 +523,3 @@ The `listener` will be called with `listener(details)` when an error occurs.
* `timestamp` Double
* `fromCache` Boolean
* `error` String - The error description.
#### `ses.protocol`
Returns an instance of [protocol](protocol.md) module for this session.
```javascript
const electron = require('electron');
const app = electron.app;
const session = electron.session;
const path = require('path');
app.on('ready', function() {
const protocol = session.fromPartition(partitionName).protocol;
protocol.registerFileProtocol('atom', function(request, callback) {
var url = request.url.substr(7);
callback({path: path.normalize(__dirname + '/' + url)});
}, function (error) {
if (error)
console.error('Failed to register protocol')
});
});
```