feat: add fileSystem to ses.setPermissionCheckHandler (#48327)

feat: add fileSystem to ses.setPermissionCheckHandler

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:
trop[bot]
2025-09-24 13:10:33 -04:00
committed by GitHub
parent 99feff3965
commit cf9d0448be
7 changed files with 325 additions and 22 deletions

1
spec/fixtures/file-system/persist.txt vendored Normal file
View File

@@ -0,0 +1 @@
hello persist

View File

@@ -10,13 +10,17 @@
<script>
const { ipcRenderer } = require('electron')
let fileHandle = null;
let handle = null;
let sent = false;
window.document.onpaste = async (event) => {
const fileItem = event.clipboardData.items[0];
fileHandle = await fileItem.getAsFileSystemHandle();
handle = await fileItem.getAsFileSystemHandle();
if (!sent) {
ipcRenderer.send('did-create-file-handle');
if (handle.kind === 'file') {
ipcRenderer.send('did-create-file-handle');
} else {
ipcRenderer.send('did-create-directory-handle');
}
sent = true;
}
};