Describe the bug
With ant design pro (short for antdpro), eel.js should be used in document.ejs, and antdpro will compile this ejs and all the tsx.
The error comes here: when debugging, tsx will load after ejs.
So when eel.js is downloaded in ejs, and the eel._init() involked,
the tsx is not loaded,
host is not setted
so the websocket connect to the host of npm, and failed
But if i change to call eel._init() in tsx, the DOMContentLoaded event has already fired, so the callback will not be involked. It does not always fail, but frequently.
To Reproduce
Steps to reproduce the behavior:
use ant design pro to generate a new app
from example/07-CreateReactApp copy eel-CRA.py to app's root path
copy example/07.../src/App.* to app's src/pages/
add to document.ejs
Expected behavior
it should work with antdpro
Desktop (please complete the following information):
OS: mac os
Browser chrome
Version 88.0.4324.150
Additional context
I changed this to make it work:
1 Extract the callback for event DOMContentLoaded to a functioin with name afterLoad()
2 call this from App.tsx after set_host
Or replace the eel._host in python, and don't use this:
Eel version eel 0.1.1
Describe the bug With ant design pro (short for antdpro), eel.js should be used in document.ejs, and antdpro will compile this ejs and all the tsx. The error comes here: when debugging, tsx will load after ejs. So when eel.js is downloaded in ejs, and the eel._init() involked,
To Reproduce Steps to reproduce the behavior:
Expected behavior it should work with antdpro
Desktop (please complete the following information):
Additional context I changed this to make it work: 1 Extract the callback for event DOMContentLoaded to a functioin with name afterLoad() 2 call this from App.tsx after set_host
Or replace the eel._host in python, and don't use this: