mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
Fix typo in registerSchemesAsPrivileged reference (#17214)
This commit is contained in:
@@ -75,7 +75,7 @@ By default web storage apis (localStorage, sessionStorage, webSQL, indexedDB, co
|
||||
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.
|
||||
|
||||
`protocol.registerSchemesAsPriviliged` can be used to replicate the functionality of the previous `protocol.registerStandardSchemes`, `webFrame.registerURLSchemeAs*` and `protocol.registerServiceWorkerSchemes` functions that existed prior to Electron 5.0.0, for example:
|
||||
`protocol.registerSchemesAsPrivileged` can be used to replicate the functionality of the previous `protocol.registerStandardSchemes`, `webFrame.registerURLSchemeAs*` and `protocol.registerServiceWorkerSchemes` functions that existed prior to Electron 5.0.0, for example:
|
||||
|
||||
**before (<= v4.x)**
|
||||
```javascript
|
||||
@@ -88,7 +88,7 @@ webFrame.registerURLSchemeAsPrivileged('scheme2', { secure: true })
|
||||
|
||||
**after (>= v5.x)**
|
||||
```javascript
|
||||
protocol.registerSchemesAsPriviliged([
|
||||
protocol.registerSchemesAsPrivileged([
|
||||
{ scheme: 'scheme1', privileges: { standard: true, secure: true } },
|
||||
{ scheme: 'scheme2', privileges: { standard: true, secure: true } }
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user