Call window.close() on javascript with Eel
See original GitHub issueHi so I’ve been trying to close a window on javascript working with eel, but window.close()
doesn’t seem to work, are there any other ways to make the window close or to terminate the eel process on javascript?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
Call window.close() on javascript with Eel · Issue #198 - GitHub
Hi so I've been trying to close a window on javascript working with eel, but window.close() doesn't seem to work, are there any...
Read more >How to start another window using eel python? - Stack Overflow
In this case, you can call eel. show which will re-use your existing web instance to show the new window and page.
Read more >Eel options - DEV Community
init, close_callback, this function allow us to modify default behavior upon closing the window; instead of only exit, it will first print "Bye!...
Read more >Eel - PyPI
close_callback, a lambda or function that is called when a websocket to a window closes (i.e. when the user closes the window). It...
Read more >Create HTML User Interface using Eel in Python
The HTML file here is used to create a window that displays all the required attributes, the javascript file will be called by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was able to fix this issue with this
window.open('','_self').close()
code instead of thewindow.close()
method.Found it so instead of redirecting with javascript to my page which I couldn’t close later I created a js function that replaced the href and opened a new window so I could then call the window.close() argument. Here is my function if anyone wants to use it:
the left and top var are just to keep the window in the same position as the previous one. Anyway big thanks to @samuelhwilliams and @FutureLights for helping me out