Repository: electron/electron (language: cpp)

Issue:
[Bug]: Fiddle in Inter-Process Communication Documentation not working and code missing an import
### 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

16.0.8

### What operating system are you using?

Windows

### Operating System Version

Windows 10

### What arch are you using?

x64

### Last Known Working Electron version

16.0.8

### Expected Behavior

Fiddle in the Electron Documentation at  https://www.electronjs.org/docs/latest/tutorial/ipc#pattern-3-main-to-renderer should load successfully and should include "ipcMain" in the imports of "main.js".

### Actual Behavior

Fiddle will not load and when copying the code manually running the code will result in an Error since "ipcMain" is missing in the import of "main.js".

### Testcase Gist URL

_No response_

### Additional Information

Couldn't find a seperate issue board for the documentation, so I posted this here.


Discussion / hints:
Had the same problem following the web based IPC tutorials on 17.0.1

Fix patch:
diff --git a/docs/fiddles/ipc/pattern-3/renderer.js b/docs/fiddles/ipc/pattern-3/renderer.js
index 3b184add08ba2..04fd4bca890a3 100644
--- a/docs/fiddles/ipc/pattern-3/renderer.js
+++ b/docs/fiddles/ipc/pattern-3/renderer.js
@@ -4,5 +4,5 @@ window.electronAPI.handleCounter((event, value) => {
     const oldValue = Number(counter.innerText)
     const newValue = oldValue + value
     counter.innerText = newValue
-    event.reply('counter-value', newValue)
+    event.sender.send('counter-value', newValue)
 })
diff --git a/docs/tutorial/ipc.md b/docs/tutorial/ipc.md
index 0189e0db7e806..5d3fc2ffec29b 100644
--- a/docs/tutorial/ipc.md
+++ b/docs/tutorial/ipc.md
@@ -379,7 +379,7 @@ module that uses the `webContents.send` API to send an IPC message from the main
 target renderer.
 
 ```javascript {11-26} title='main.js (Main Process)'
-const {app, BrowserWindow, Menu} = require('electron')
+const {app, BrowserWindow, Menu, ipcMain} = require('electron')
 const path = require('path')
 
 function createWindow () {
@@ -519,7 +519,7 @@ window.electronAPI.onUpdateCounter((event, value) => {
   const oldValue = Number(counter.innerText)
   const newValue = oldValue + value
   counter.innerText = newValue
-  event.reply('counter-value', newValue)
+  event.sender.send('counter-value', newValue)
 })
 ```
 


Test patch: