Skip to content

platform/blocker/blocker-engine

Defined in: app/src/platform/blocker/blocker-engine.ts:46

The loaded filter engines and what the content blocker asks of them.

new BlockerEngine(loaded, options): BlockerEngine

Defined in: app/src/platform/blocker/blocker-engine.ts:57

LoadedEngine

The engines and the library’s request class.

ContentBlockerOptions

The options of the content blocker.

BlockerEngine

blocksPopup(url, openerUrl): boolean

Defined in: app/src/platform/blocker/blocker-engine.ts:193

Whether a popup that a page opens is one that the filter lists block.

string

The address the popup would show.

string

The address of the page that opens it.

boolean

domainOf(url): string

Defined in: app/src/platform/blocker/blocker-engine.ts:183

The registrable domain of a page, such as example.co.uk for www.example.co.uk. Sites on hosting platforms count as sites of their own, such as alice.github.io.

string

The page’s address.

string

elementRules(url, elements): string

Defined in: app/src/platform/blocker/blocker-engine.ts:157

The generic element hiding rules for the classes, ids and links of a frame.

string

The frame’s address.

FrameElements

What the frame reported.

string

frameRules(url): FrameRules

Defined in: app/src/platform/blocker/blocker-engine.ts:134

The element hiding rules, procedural rules and scriptlets for a frame that starts.

string

The frame’s address.

FrameRules

headersReceived(details): Readonly<Record<string, readonly string[]>> | undefined

Defined in: app/src/platform/blocker/blocker-engine.ts:108

Adds the content security policy that $csp filters set for a page.

OnHeadersReceivedListenerDetails

The response of a page.

Readonly<Record<string, readonly string[]>> | undefined

loadExtras(): Promise<void>

Defined in: app/src/platform/blocker/blocker-engine.ts:209

Loads the engines of the optional lists that are on, so that they apply from the next request on; a group whose engine has loaded already costs nothing.

Promise<void>

mainFrame(url): RequestDecision | undefined

Defined in: app/src/platform/blocker/blocker-engine.ts:68

Takes the tracking parameters that the lists name out of the address of a page; pages themselves are never blocked.

string

The page’s address.

RequestDecision | undefined

resource(name): ReplacementResource | undefined

Defined in: app/src/platform/blocker/blocker-engine.ts:123

A replacement resource of the filter data by its file name, for the resource scheme.

string

The file name.

ReplacementResource | undefined

subresource(details, sourceUrl, type): RequestDecision | undefined

Defined in: app/src/platform/blocker/blocker-engine.ts:79

Decides about a request that a page makes.

OnBeforeRequestListenerDetails

The request.

string

The page it belongs to.

RequestType

Its type for the filter engine.

RequestDecision | undefined

openBlockerEngine(options): Promise<BlockerEngine>

Defined in: app/src/platform/blocker/blocker-engine.ts:31

Reads the filter data and makes the engine of the content blocker. It loads with the first web page, together with this module, so the start of the browser does neither.

ContentBlockerOptions

The options of the content blocker.

Promise<BlockerEngine>

When the data is missing or damaged.