MDN self-hosted library · e01.org

extension.isAllowedFileSchemeAccess()

Returns true if the extension can access the "file://" scheme, false otherwise.

Open notebook · 1 cells webextension-api-function upstream source

Returns true if the extension can access the "file://" scheme, false otherwise.

Syntax

let isAllowed = browser.extension.isAllowedFileSchemeAccess()

Parameters

None.

Return value

A Promise fulfilled with a boolean: true if the extension is allowed access to "file://" URLs, false otherwise.

Examples

function logIsAllowed(answer) {
  console.log(`Is allowed: ${answer}`);
}

let isAllowed = browser.extension.isAllowedFileSchemeAccess();
isAllowed.then(logIsAllowed);

Browser compatibility

[!NOTE] This API is based on Chromium's chrome.extension API. This documentation is derived from extension.json in the Chromium code.