electron/spec/fixtures/file-system/test-writable.html
2024-04-10 22:06:47 +02:00

26 lines
No EOL
507 B
HTML

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