mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: fix UI Mode on Codespaces (#23549)
This commit is contained in:
parent
6351630af2
commit
ce2f902c1f
@ -644,7 +644,7 @@ const callbacks = new Map<number, { resolve: (arg: any) => void, reject: (arg: E
|
|||||||
|
|
||||||
const initWebSocket = async (onClose: () => void) => {
|
const initWebSocket = async (onClose: () => void) => {
|
||||||
const guid = new URLSearchParams(window.location.search).get('ws');
|
const guid = new URLSearchParams(window.location.search).get('ws');
|
||||||
const ws = new WebSocket(`ws://${window.location.hostname}:${window.location.port}/${guid}`);
|
const ws = new WebSocket(`${window.location.protocol === 'https:' ? 'wss' : 'ws'}://${window.location.hostname}:${window.location.port}/${guid}`);
|
||||||
await new Promise(f => ws.addEventListener('open', f));
|
await new Promise(f => ws.addEventListener('open', f));
|
||||||
ws.addEventListener('close', onClose);
|
ws.addEventListener('close', onClose);
|
||||||
ws.addEventListener('message', event => {
|
ws.addEventListener('message', event => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user