INNER CODE UNIT · JavaScript

Promise

cyrus-and/chrome-har-capturer · bin/cli.js:96

        await new Promise((fulfill, reject) => {
            setTimeout(fulfill, program.grace || 0);
        });
        // allow to add the output of user-provided code to the HAR
        let user;
        if (userMetric) {
            const {result, exceptionDetails} = await client.Runtime.evaluate({
                expression: userMetric,
                returnByValue: true,
                awaitPromise: true,
            });
            // return the result or the error message
            if (exceptionDetails) {
                user = exceptionDetails.exception.description;
            } else {
                user = result.value;
            }
        }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…