How to use the chrome-remote-interface.Protocol function in chrome-remote-interface

To help you get started, we’ve selected a few chrome-remote-interface examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github N0taN3rd / Squidwarc / lib / crawler / launcher.js View on Github external
options.connect = {
        host: 'localhost',
        port: 9222,
        remote: true
      }
    } else {
      if (options.connect.port === undefined) {
        options.connect.port = 9222
      }
      if (options.connect.host === undefined) {
        options.connect.host = 'localhost'
      }
      options.connect.remote = true
    }
    await Launcher.launchNoConnect(options)
    return CRI.Protocol(options.connect)
  }
}
github N0taN3rd / Squidwarc / lib / remoteChrome.js View on Github external
static Protocol (...args) {
    return CDP.Protocol(...args)
  }
github N0taN3rd / Squidwarc / lib / crawler / index.js View on Github external
static Protocol (...args) {
    return CDP.Protocol(...args)
  }
github johnspackman / chrome-remote-multiplex / src / multiplex.js View on Github external
connect() {
    const t = this;
    Protocol(t.options).then((data) => {
      data.descriptor.domains.forEach((domain) => {
        if (t._domainProxies[domain.domain] !== undefined)
          return;
        var cmdEnable = null;
        var cmdDisable = null;
        domain.commands.forEach((command) => {
          if (command.name === "enable")
            cmdEnable = command;
          else if (command.name === "disable")
            cmdDisable = command;
        });
        if (cmdEnable || cmdDisable) {
          LOG.debug("Creating default domain for " + domain.domain);
          t._domainProxies[domain.domain] = new DefaultProxyDomain(this);
        }
      });
github johnspackman / chrome-remote-multiplex / dist / multiplex.js View on Github external
value: function connect() {
      var _this6 = this;

      var t = this;
      Protocol(t.options).then(function (data) {
        data.descriptor.domains.forEach(function (domain) {
          if (t._domainProxies[domain.domain] !== undefined) return;
          var cmdEnable = null;
          var cmdDisable = null;
          domain.commands.forEach(function (command) {
            if (command.name === "enable") cmdEnable = command;else if (command.name === "disable") cmdDisable = command;
          });
          if (cmdEnable || cmdDisable) {
            LOG.debug("Creating default domain for " + domain.domain);
            t._domainProxies[domain.domain] = new DefaultProxyDomain(_this6);
          }
        });
      });
      return new Promise(function (resolve, reject) {
        var url = t.target.originalWebSocketDebuggerUrl;
        url = url.replace(/localhost\:/g, t.multiplexServer.options.remoteClientHostname + ":");
github N0taN3rd / Squidwarc / lib / launcher / chrome.js View on Github external
static async getProtocolDef (options = {}) {
    options = ensureOptions(options)
    return CRI.Protocol(options)
  }
}