Skip to content

main/permission-requests

Defined in: app/src/main/permission-requests.ts:18

What the permissions of web pages need from the composition root.

readonly logger: Logger

Defined in: app/src/main/permission-requests.ts:27

readonly prompts: () => Promise<PermissionPrompts>

Defined in: app/src/main/permission-requests.ts:26

Loads the prompts, which come with the first question.

Promise<PermissionPrompts>

readonly save: (sites) => void

Defined in: app/src/main/permission-requests.ts:22

Keeps the decisions.

SitePermissions

void

readonly sites: () => SitePermissions

Defined in: app/src/main/permission-requests.ts:20

The decisions of all sites, from the settings.

SitePermissions

readonly windowOf: (contents) => BrowserWindowController | undefined

Defined in: app/src/main/permission-requests.ts:24

The window of a tab’s page.

WebContents

BrowserWindowController | undefined

requestPermission(options, contents, permission, mediaTypes, requestingUrl): Promise<boolean>

Defined in: app/src/main/permission-requests.ts:58

Answers a site’s request for a permission: at once when it needs no question or was decided before, or else with the answer to a question in its window, which the site keeps.

SitePermissionOptions

Settings and windows.

WebContents

The page.

string

Electron’s name of the permission.

readonly string[]

The devices of a request for media.

string

The address of the frame that asks.

Promise<boolean>


requestScreen(options, request, callback): void

Defined in: app/src/main/permission-requests.ts:85

Lets the user choose a screen or a window for a site to see, if the page’s tab is the one that its window shows; otherwise the site sees nothing.

SitePermissionOptions

Settings and windows.

DisplayMediaRequestHandlerHandlerRequest

Electron’s request.

(streams) => void

Electron’s answer.

void