mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
feat: implement File System API support (#41827)
* feat: implement File System API support Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * test: add a test for writable permission checking Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * fix: gn check include issues Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * chore: feedback from review Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * chore: cleanup feedback from review Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * refactor: namespace to electron Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * fixup! chore: cleanup feedback from review Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * chore: address more feedback from review Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * 5301485: Add content analysis to File System Access Javascript API. https://chromium-review.googlesource.com/c/chromium/src/+/5301485 Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * docs: improve typing of details object Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * chore: address outstanding todo Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * refactor: use Chrome's file system access blocklist Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * lint Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * fix: Windows build Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * test: clarify test verbiage Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -818,15 +818,10 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => {
|
||||
* `top-level-storage-access` - Allow top-level sites to request third-party cookie access on behalf of embedded content originating from another site in the same related website set using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
|
||||
* `window-management` - Request access to enumerate screens using the [`getScreenDetails`](https://developer.chrome.com/en/articles/multi-screen-window-placement/) API.
|
||||
* `unknown` - An unrecognized permission request.
|
||||
* `fileSystem` - Request access to read, write, and file management capabilities using the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API).
|
||||
* `callback` Function
|
||||
* `permissionGranted` boolean - Allow or deny the permission.
|
||||
* `details` Object - Some properties are only available on certain permission types.
|
||||
* `externalURL` string (optional) - The url of the `openExternal` request.
|
||||
* `securityOrigin` string (optional) - The security origin of the `media` request.
|
||||
* `mediaTypes` string[] (optional) - The types of media access being requested, elements can be `video`
|
||||
or `audio`
|
||||
* `requestingUrl` string - The last URL the requesting frame loaded
|
||||
* `isMainFrame` boolean - Whether the frame making the request is the main frame
|
||||
* `details` [PermissionRequest](structures/permission-request.md) | [FilesystemPermissionRequest](structures/filesystem-permission-request.md) | [MediaAccessPermissionRequest](structures/media-access-permission-request.md) | [OpenExternalPermissionRequest](structures/open-external-permission-request.md) - Additional information about the permission being requested.
|
||||
|
||||
Sets the handler which can be used to respond to permission requests for the `session`.
|
||||
Calling `callback(true)` will allow the permission and `callback(false)` will reject it.
|
||||
|
||||
Reference in New Issue
Block a user