mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
update docs
This commit is contained in:
@@ -50,8 +50,11 @@ non-standard schemes can not recognize relative URLs:
|
|||||||
|
|
||||||
Registering a scheme as standard will allow access to files through the
|
Registering a scheme as standard will allow access to files through the
|
||||||
[FileSystem API][file-system-api]. Otherwise the renderer will throw a security
|
[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
|
error for the scheme.
|
||||||
replace the `http` protocol, you have to register it as a standard scheme:
|
|
||||||
|
By default web storage apis (localStorage, sessionStorage, webSQL, indexedDB, cookies)
|
||||||
|
are disabled for non standard schemes. 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
|
```javascript
|
||||||
const {app, protocol} = require('electron')
|
const {app, protocol} = require('electron')
|
||||||
|
|||||||
Reference in New Issue
Block a user