docs: Say more about standard scheme
This commit is contained in:
parent
652843f447
commit
db6d8de5dc
1 changed files with 10 additions and 1 deletions
|
@ -37,6 +37,11 @@ Registers a custom protocol of `scheme`, the `handler` would be called with
|
||||||
You need to return a request job in the `handler` to specify which type of
|
You need to return a request job in the `handler` to specify which type of
|
||||||
response you would like to send.
|
response you would like to send.
|
||||||
|
|
||||||
|
By default the scheme is treated like `http:`, which is parsed differently
|
||||||
|
from protocols that follows "generic URI syntax" like `file:`, so you probably
|
||||||
|
want to call `protocol.registerStandardSchemes` to make your scheme treated as
|
||||||
|
standard scheme.
|
||||||
|
|
||||||
## protocol.unregisterProtocol(scheme, callback)
|
## protocol.unregisterProtocol(scheme, callback)
|
||||||
|
|
||||||
* `scheme` String
|
* `scheme` String
|
||||||
|
@ -48,7 +53,11 @@ Unregisters the custom protocol of `scheme`.
|
||||||
|
|
||||||
* `value` Array
|
* `value` Array
|
||||||
|
|
||||||
`value` is an array of custom schemes to be registered to the standard.
|
`value` is an array of custom schemes to be registered as standard schemes.
|
||||||
|
|
||||||
|
A standard scheme adheres to what RFC 3986 calls
|
||||||
|
[generic URI syntax](https://tools.ietf.org/html/rfc3986#section-3). This
|
||||||
|
includes `file:` and `filesystem:`.
|
||||||
|
|
||||||
## protocol.isHandledProtocol(scheme, callback)
|
## protocol.isHandledProtocol(scheme, callback)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue