platform/electron/app-protocol
Classes
Section titled “Classes”AppProtocol
Section titled “AppProtocol”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.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AppProtocol(
root,hosts):AppProtocol
Defined in: app/src/platform/electron/app-protocol.ts:45
Parameters
Section titled “Parameters”string
Directory of the bundled renderer files.
ReadonlySet<string>
Internal hosts, such as shell.
Returns
Section titled “Returns”Methods
Section titled “Methods”refuse()
Section titled “refuse()”refuse(
session):void
Defined in: app/src/platform/electron/app-protocol.ts:64
Refuses every app:// request in a web session.
Parameters
Section titled “Parameters”session
Section titled “session”Session
A session used by web tabs.
Returns
Section titled “Returns”void
serve()
Section titled “serve()”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.
Parameters
Section titled “Parameters”session
Section titled “session”Session
The internal session.
Returns
Section titled “Returns”void
Functions
Section titled “Functions”registerAppScheme()
Section titled “registerAppScheme()”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.
Returns
Section titled “Returns”void