feat(control): Race Controller Master, one browser runs the race and others follow or take over (1.77.0)
This commit is contained in:
1 parent
54989d8597
commit
cf3a4c5fdb
16 files changed
+316
-9
No files matched your search
@@ -6,7 +6,7 @@ const localPause = ms => new Promise(resolve => setTimeout(resolve, ms));
|
||||
// Attaches an independent CDP connection to one browser page target. Needed because the
|
||||
// popup opened by window.open() is a second, separate page target with its own JS/DOM,
|
||||
// distinct from the admin page the harness is already attached to.
|
||||
async function attach(target) {
|
||||
export async function attach(target) {
|
||||
const socket = new WebSocket(target.webSocketDebuggerUrl);
|
||||
await new Promise((resolve, reject) => { socket.addEventListener("open", resolve, { once: true }); socket.addEventListener("error", reject, { once: true }); });
|
||||
let nextId = 0;
|
||||
|
||||
Reference in new issue
Block a user