skpm/sketch-module-web-view

Get a callback with the result from `sendToWebView`

Open

#131 aperta il 27 ott 2019

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)JavaScript (63 fork)github user discovery
enhancementhelp wanted

Metriche repository

Star
 (290 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Is there any reliable way to call a javascript function on the web view and get a callback with the result after? I don't have access to webContents in my case, because I am communicating with the web view from another command. I have tried a few things using getWebview() or accessing the thread dictionary directly, but mostly been causing Sketch to crash and still failing to get a response using .then().

Is there any recommended way using sendToWebview()?

Guida contributor