26 lines
507 B
HTML
26 lines
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>
|