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
Menu