Repository: electron/electron (language: cpp)

Issue:
[Docs] Discrepency in the Native Drag and Drop example section
### Preflight Checklist

- [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [x] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

34.0.1

### What operating system(s) are you using?

Windows

### Operating System Version

Windows 10 19045.5371

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

The docs are unified in what they are informing

### Actual Behavior

Upon reading the docs about Native drag and drop here

https://www.electronjs.org/docs/latest/tutorial/native-file-drag-drop#preloadjs

a discrepancy is revealed as the correct preload.js file is toward the end in the fiddle.

![Image](https://github.com/user-attachments/assets/00e26c59-1f75-4dd3-b0ba-e0bd8d1dbe90)


### Testcase Gist URL

_No response_

### Additional Information

The node import demonstrated at the first example of preload.js prevents the example from working. Simply removing that will correct the docs.


Discussion / hints:

Fix patch:
diff --git a/docs/tutorial/native-file-drag-drop.md b/docs/tutorial/native-file-drag-drop.md
index 2095777eb26d0..bf284cbb6da84 100644
--- a/docs/tutorial/native-file-drag-drop.md
+++ b/docs/tutorial/native-file-drag-drop.md
@@ -22,12 +22,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)
 })
 ```
 


Test patch: