platform/blocker/resource-protocol
Interfaces
Section titled “Interfaces”ReplacementResource
Section titled “ReplacementResource”Defined in: app/src/platform/blocker/resource-protocol.ts:11
A replacement resource; the body is Base64 when the content type ends in ;base64.
Properties
Section titled “Properties”
readonlybody:string
Defined in: app/src/platform/blocker/resource-protocol.ts:12
contentType
Section titled “contentType”
readonlycontentType:string
Defined in: app/src/platform/blocker/resource-protocol.ts:13
Variables
Section titled “Variables”resourceScheme
Section titled “resourceScheme”
constresourceScheme:"astela-resource"='astela-resource'
Defined in: app/src/platform/blocker/resource-protocol.ts:8
The scheme of the replacement resources that $redirect filters serve. A script that is
redirected to a data: address does not run in Chromium, so the resources come from a
privileged scheme of their own, on web sessions only.
Functions
Section titled “Functions”resourceUrl()
Section titled “resourceUrl()”resourceUrl(
name):string
Defined in: app/src/platform/blocker/resource-protocol.ts:27
The address under which a resource is served.
Parameters
Section titled “Parameters”string
The resource’s file name.
Returns
Section titled “Returns”string
serveResources()
Section titled “serveResources()”serveResources(
session,lookup):void
Defined in: app/src/platform/blocker/resource-protocol.ts:37
Serves the replacement resources on a web session. Every page may load them, because a redirected request keeps the origin of the page that made it.
Parameters
Section titled “Parameters”session
Section titled “session”Session
A session of web content.
lookup
Section titled “lookup”(name) => ReplacementResource | undefined
Finds a resource by its file name; undefined if there is none.
Returns
Section titled “Returns”void