Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

extension.isAllowedFileSchemeAccess()

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

Syntax

chrome.extension.isAllowedFileSchemeAccess(
  function(isAllowedAccess) {...} // callback function
)

This API is also available as browser.extension.isAllowedFileSchemeAccess() in a version that returns a promise.

Parameters

callback
function. The function is passed the following arguments:
isAllowedAccess
boolean. true if the extension can access the 'file://' scheme, false otherwise.

Browser compatibility

Chrome Edge Firefox Firefox for Android Opera
Basic support Yes No 48.0 48.0 33

Examples

chrome.browserAction.onClicked.addListener(function () {
  chrome.extension.isAllowedFileSchemeAccess((isAllowed) => {
    console.log(isAllowed);
  });
});

Acknowledgements

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

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

Document Tags and Contributors

 Contributors to this page: Makyen, wbamberg
 Last updated by: Makyen,