Description
Clear and concise description of the problem
Provide an autoClose
option that closes the EventSource
automatically on a beforeunload
window event trigger. Same thing useWebSocket
provides:
vueuse/packages/core/useWebSocket/index.ts
Lines 93 to 98 in 77c795d
vueuse/packages/core/useWebSocket/index.ts
Lines 318 to 322 in 77c795d
Suggested solution
Same implementation as in useWebSocket
.
Alternative
N/A
Additional context
https://vueuse.org/core/useEventSource/
https://vueuse.org/core/useWebSocket/
https://vueuse.org/core/useWebSocket/#autoclose
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.