main/permission-requests
Interfaces
Section titled “Interfaces”SitePermissionOptions
Section titled “SitePermissionOptions”Defined in: app/src/main/permission-requests.ts:18
What the permissions of web pages need from the composition root.
Properties
Section titled “Properties”logger
Section titled “logger”
readonlylogger:Logger
Defined in: app/src/main/permission-requests.ts:27
prompts
Section titled “prompts”
readonlyprompts: () =>Promise<PermissionPrompts>
Defined in: app/src/main/permission-requests.ts:26
Loads the prompts, which come with the first question.
Returns
Section titled “Returns”Promise<PermissionPrompts>
readonlysave: (sites) =>void
Defined in: app/src/main/permission-requests.ts:22
Keeps the decisions.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
readonlysites: () =>SitePermissions
Defined in: app/src/main/permission-requests.ts:20
The decisions of all sites, from the settings.
Returns
Section titled “Returns”windowOf
Section titled “windowOf”
readonlywindowOf: (contents) =>BrowserWindowController|undefined
Defined in: app/src/main/permission-requests.ts:24
The window of a tab’s page.
Parameters
Section titled “Parameters”contents
Section titled “contents”WebContents
Returns
Section titled “Returns”BrowserWindowController | undefined
Functions
Section titled “Functions”requestPermission()
Section titled “requestPermission()”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.
Parameters
Section titled “Parameters”options
Section titled “options”Settings and windows.
contents
Section titled “contents”WebContents
The page.
permission
Section titled “permission”string
Electron’s name of the permission.
mediaTypes
Section titled “mediaTypes”readonly string[]
The devices of a request for media.
requestingUrl
Section titled “requestingUrl”string
The address of the frame that asks.
Returns
Section titled “Returns”Promise<boolean>
requestScreen()
Section titled “requestScreen()”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.
Parameters
Section titled “Parameters”options
Section titled “options”Settings and windows.
request
Section titled “request”DisplayMediaRequestHandlerHandlerRequest
Electron’s request.
callback
Section titled “callback”(streams) => void
Electron’s answer.
Returns
Section titled “Returns”void