lupine.web 1.0.28 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/lib/debug-watch.ts +2 -1
package/package.json
CHANGED
package/src/lib/debug-watch.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
let flag = 0;
|
|
2
2
|
export const debugWatch = (port: number) => {
|
|
3
3
|
console.log('Creating debug-watch socket');
|
|
4
|
-
const
|
|
4
|
+
const protocol = location.protocol === "https:" ? "wss:" : "ws:";
|
|
5
|
+
const socket = new WebSocket(`${protocol}//${location.host}/debug/client`);
|
|
5
6
|
window.addEventListener('beforeunload', () => {
|
|
6
7
|
socket.close();
|
|
7
8
|
});
|