From 6251b50fd3527f6fc3a9fc360ebc8ffaa88ca057 Mon Sep 17 00:00:00 2001 From: "electron-website-docs-updater[bot]" <166660481+electron-website-docs-updater[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 18:07:08 +0000 Subject: [PATCH] =?UTF-8?q?chore:=20update=20ref=20to=20docs=20(?= =?UTF-8?q?=F0=9F=A4=96)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/latest/.sha | 2 +- docs/latest/tutorial/native-file-drag-drop.md | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/latest/.sha b/docs/latest/.sha index af70e3dae..ea44e135c 100644 --- a/docs/latest/.sha +++ b/docs/latest/.sha @@ -1 +1 @@ -c538aa8e6cf2f34e74f6860138536bab84b74a02 \ No newline at end of file +600551766d0de3afe880c566dfce21ae03db6cd6 \ No newline at end of file diff --git a/docs/latest/tutorial/native-file-drag-drop.md b/docs/latest/tutorial/native-file-drag-drop.md index f4b15bb48..42198a556 100644 --- a/docs/latest/tutorial/native-file-drag-drop.md +++ b/docs/latest/tutorial/native-file-drag-drop.md @@ -29,12 +29,9 @@ In `preload.js` use the [`contextBridge`][] to inject a method `window.electron. ```js const { contextBridge, ipcRenderer } = require('electron') -const path = require('node:path') contextBridge.exposeInMainWorld('electron', { - startDrag: (fileName) => { - ipcRenderer.send('ondragstart', path.join(process.cwd(), fileName)) - } + startDrag: (fileName) => ipcRenderer.send('ondragstart', fileName) }) ```