In electron, can the main process send a synchronous message to a window?

Open
#10 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
electron, javascript
Domain
desktop

Research direction

Start by reading the Electron main-process and window communication APIs, focusing on how a script in the main process could receive a result from the outline window. Confirm whether synchronous request-and-response messaging is supported and document the supported approach or its limitation. Done means the issue has a clear, tested recommendation for implementing op.go.

Written by the indexing model from the issue text.

Description

Big picture, I'm running user scripts in the main process.

I want the scripts to be able to customize the app, which is displaying an outline in the front tab.

So I need to be able to send a message like:

op.go (direction, count)

As part of a script...

 if (!op.go (down, 1)) {
    op.go (left, 1);
    op.go (down, 1);
    }

In order for the first op.go to work, it must be told whether or not the attempt to go down worked. If not, it has reached the end of the list, and must pop out a level and continue.

Obviously op.go must be synchronous.

The script is running in the main process.

The outline is in the window.

Thus I need to be able to send a synchronous message to the window and get back a result.

Any help appreciated.

Dominant language
HTML
Stars
134
Forks
10
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from scripting/Scripting-News

All issues in scripting/Scripting-News

Similar issues

More Desktop Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.