Files
electron/spec/fixtures/file-system/test-perms.html
trop[bot] 00035f8435 feat: add fileSystem to ses.setPermissionCheckHandler (#48326)
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>
2025-10-08 10:44:46 +02:00

30 lines
625 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<script>
const { ipcRenderer } = require('electron')
let handle = null;
let sent = false;
window.document.onpaste = async (event) => {
const fileItem = event.clipboardData.items[0];
handle = await fileItem.getAsFileSystemHandle();
if (!sent) {
if (handle.kind === 'file') {
ipcRenderer.send('did-create-file-handle');
} else {
ipcRenderer.send('did-create-directory-handle');
}
sent = true;
}
};
</script>
</body>
</html>