INNER CODE UNIT · JavaScript

id

cyrus-and/chrome-remote-interface · lib/chrome.js:282

        const id = this._nextCommandId++;
        const message = {
            id,
            method,
            sessionId,
            params: params || {}
        };
        this._ws.send(JSON.stringify(message), (err) => {
            if (err) {
                // handle low-level WebSocket errors
                if (typeof callback === 'function') {
                    callback(err);
                }
            } else {
                this._callbacks[id] = callback;
            }
        });
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…