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

Aperta
#10 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
electron, javascript
Ambito
desktop

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
HTML
Stelle
134
Fork
10
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di scripting/Scripting-News

Tutte le issue di scripting/Scripting-News

Issue simili

Altre issue su Desktop Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.