INNER CODE UNIT · JavaScript

Promise

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

            return new Promise((fulfill, reject) => {
                chrome.once(rawEventName, fulfill);
            });
        }
    };
    decorate(handler, 'event', event);
    chrome[eventName] = chrome[domainName][event.name] = handler;
}

function addType(chrome, domainName, type) {
    const typeName = `${domainName}.${type.id}`;
    const help = {};
    decorate(help, 'type', type);
    chrome[typeName] = chrome[domainName][type.id] = help;
}

function prepare(object, protocol) {
    // assign the protocol and generate the shorthands

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…