Skip to content

sendToRenderers acts differently than callRenderer #26

@Laruxo

Description

@Laruxo

From documentation I expected that these two functions act the same. Only expected difference was callRenderer sending to specific window and sendToRenderers sending to BrowserWindow.getAllWindows().

After digging deeper I found that sendToRenderers does not use the same channel formatting as the other method, so it is impossible to handle incoming messages using ipcRenderer.answerMain.

I have two possible solutions:

  1. Exposing additional function in ipcRenderer to handle unchanged channel.
  2. Formatting channel in sendToRenderers for every window.

@sindresorhus which one would you prefer?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions