How to run Javascript when user clicks something from the Electron main menu using context bridge?

So the proper way to do ipc comms from main to renderer is via the context bridge right?

So what is the exact recommended way to do this from main to renderer? I have only done this in the reverse direction.

In my case, I want to open a modal dialog on the screen via jQuery when someone clicks a particular menu item.

Here’s a sample of what I am trying to do:

{
            label: 'Open Dialog',
            click: () => {
              $("#lastReadingViewer").show(); // this doesn't work - I get errors because I guess the jQuery doesn't exist in this context
              ipcMain.emit('openDialog'); // so now I think I need to use IPC, starting with this call, but now where do I put the code that listens for this event and then runs the jQuery?
            }
          }