Ask for advice on communication between Electron processes

rendering process:

<span class="test"></span>
<script>
    const ipc = require("electron").ipcRenderer;
    document.querySelector(".test").onclick = () => {
        ipc.send("test", (e, v) => {
            alert(v);
        });
    };
</script>

main process: could you tell me how to write it? I didn"t implement it with the official demo. I just want to click on it, return something from the main process, and then pop it up, such as the main process returning a string;

Mar.29,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a5c0-2c1f1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a5c0-2c1f1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?