platform/electron/app-protocol-routes
Interfaces
Section titled “Interfaces”AppSourceRoute
Section titled “AppSourceRoute”Defined in: app/src/platform/electron/app-protocol-routes.ts:39
A route for protocol.registerSource: matching URLs are served from a directory.
Properties
Section titled “Properties”
readonlymatch:object
Defined in: app/src/platform/electron/app-protocol-routes.ts:40
readonlyhost:string
readonlyoptionalpath?:string
source
Section titled “source”
readonlysource:object
Defined in: app/src/platform/electron/app-protocol-routes.ts:41
headers
Section titled “headers”
readonlyheaders:Record<string,string>
index?
Section titled “index?”
readonlyoptionalindex?:string
readonlyroot:string
readonlytype:"directory"
Variables
Section titled “Variables”appContentSecurityPolicy
Section titled “appContentSecurityPolicy”
constappContentSecurityPolicy:string
Defined in: app/src/platform/electron/app-protocol-routes.ts:10
Content Security Policy of every internal page. Scripts and styles only come from the page’s own origin, nothing can be framed or posted, and DOM sinks require Trusted Types.
appResponseHeaders
Section titled “appResponseHeaders”
constappResponseHeaders:Readonly<Record<string,string>>
Defined in: app/src/platform/electron/app-protocol-routes.ts:31
Response headers of every internal page and file. There is no Cross-Origin-Opener-Policy:
a page with one cannot stay in the renderer that its view started with its empty first
document, so every view would start a second renderer before its page could run. Internal
pages have no openers to keep apart: they cannot open windows, and web pages can neither
open nor navigate to them.
appScheme
Section titled “appScheme”
constappScheme:"app"='app'
Defined in: app/src/platform/electron/app-protocol-routes.ts:4
The browser’s internal scheme.
Functions
Section titled “Functions”appSourceRoutes()
Section titled “appSourceRoutes()”appSourceRoutes(
root,hosts):AppSourceRoute[]
Defined in: app/src/platform/electron/app-protocol-routes.ts:57
Maps every internal host to its folder of the renderer build. Paths below /assets/
of every host come from the shared asset folder, because the bundler writes one. The
files are streamed without the main thread, so internal pages load at full speed even
while the main process is busy; paths that leave a folder are never served.
Parameters
Section titled “Parameters”string
Directory that contains one folder per host and the assets folder.
Iterable<string>
Hosts that exist, such as shell.