openfablab wrote: ↑Tue Sep 08, 2020 7:34 pm
I made some successful experimenting with FreeCADGui.webView.webPage.browser.setHtml and now want to try javascript approach. But how can I correctly call python functions from javascript and get response?
openfablab wrote: ↑Tue Sep 08, 2020 7:34 pm
I made some successful experimenting with FreeCADGui.webView.webPage.browser.setHtml and now want to try javascript approach. But how can I correctly call python functions from javascript and get response?
You can't. One thing that could work is starting up an http or grpc server. But you would still need to write javascript-http-python bindings.
In preferences -> startup there is an option for a template html page to be used instead of the start page, but I haven't experimented with that. You could try using the default page as a starting point and trimming away what you don't want.