> Confirmed. window.location.href.replace('http', 'ws') works.

Great!

I'd still like to use a different URL, how about this?

```
new WebSocket('ws://' + window.location.host + resolveRelativePath('ws'))
```