How to use onclose event handler ?
See original GitHub issueHey, im wondering how to use onclose
handler?
Setting it directly db.onclose = () => {}
fires a Uncaught (in promise) TypeError: Illegal invocation
.
Any suggestions ?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
HTMLDialogElement: close event - Web APIs | MDN
Syntax. Use the event name in methods like addEventListener() , or set an event handler property. addEventListener('close', (event) => {}); ...
Read more >OnClose Event | TestComplete Documentation
The OnClose event occurs when the dialog is closed. You can create an event handler for the OnClose event to perform specific actions...
Read more >Capture event onclose browser - javascript - Stack Overflow
Events onunload or onbeforeunload you can't use directly - they do not differ between window close, page refresh, form submit, link click or...
Read more >Form.OnClosed(EventArgs) Method (System.Windows.Forms)
The OnClosed method is obsolete starting with the .NET Framework 2.0; use the OnFormClosed method instead. Raising an event invokes the event handler...
Read more >Vcl.Forms.TCustomForm.OnClose - RAD Studio API ...
Use OnClose to perform special processing when the form closes. The OnClose event specifies which event handler to call when a form is...
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 Free
Top 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
I’ve added this as
terminated
and it’ll be in the next version. https://github.com/jakearchibald/idb#opendbYour example above could be:
I think I avoided the close event because of how confusing it is. It only fires if the connection is force-closed by the browser.
However, I guess I could just call it ‘forceclose’ instead of close.