[Feature Request]: protocol.handle for Websocket
- Dominant language
- C++
- Stars
- 123k
- Forks
- 17.5k
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 873
Description
### Preflight Checklist
- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.
### Problem Description
protocol.handle() works for http but not WebSocket. so we can do protocol.handle('someProto') and then we can fetch('someProto://example/file.txt'), but we can not `new WebSocket('someProto://example/path')`
### Proposed Solution
having protocol.handle() work with both fetch and `new WebSocket()` or an option for protocol.handle() that enables it to handle WebSocket
### Alternatives Considered
having a separate function to register protocol handlers for WebSocket
### Additional Information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.