Skip to content

platform/electron/app-protocol

Defined in: app/src/platform/electron/app-protocol.ts:37

Serves the browser’s own pages from the bundled renderer files. Only sessions of the browser’s own views get the handler; web sessions get a handler that refuses every request, so web content can never load app:// resources.

new AppProtocol(root, hosts): AppProtocol

Defined in: app/src/platform/electron/app-protocol.ts:45

string

Directory of the bundled renderer files.

ReadonlySet<string>

Internal hosts, such as shell.

AppProtocol

refuse(session): void

Defined in: app/src/platform/electron/app-protocol.ts:64

Refuses every app:// request in a web session.

Session

A session used by web tabs.

void

serve(session): void

Defined in: app/src/platform/electron/app-protocol.ts:54

Serves internal pages in a session of the browser’s own views.

Session

The internal session.

void

registerAppScheme(): void

Defined in: app/src/platform/electron/app-protocol.ts:11

Registers the browser’s schemes as privileged, standard and secure; Electron allows one such call, before the app is ready. app:// serves the browser’s own pages with a code cache, and the content blocker’s replacement resources come from a scheme that web pages may fetch from, whatever their content security policy allows.

void