registerSource
Serves scheme from directories on disk without a JavaScript handler. Each request is matched against routes (a route with a host wins over one without, then the longest path prefix wins), the rest of the URL's path is resolved inside that route's root, and the file is streamed to the requester the way file: URLs are, including from asar archives, with Content-Type taken from the file extension. A path that resolves outside root, a missing file, a request that matches no route, or a method other than GET/HEAD fails with net::ERR_FILE_NOT_FOUND. A URL whose path ends in / serves the route's index file.
Use this instead of protocol.handle when a scheme only serves an app's own bundled files: no request touches the main thread, so pages and their subresources load at the same speed whether or not the main process is busy.
A scheme has either a handler or a source; protocol.unhandle removes either, and protocol.isProtocolHandled reports both. webRequest listeners apply to these requests as to any other.