Sha256: 5fb3c386843374c344423a4db8465686775dc4508fdd27b32d3fa09ef74a26b3

Contents?: true

Size: 1.12 KB

Versions: 27

Compression:

Stored size: 1.12 KB

Contents

# const {
#   ignoreDefaultArgs = false,
#   args = [],
#   dumpio = false,
#   executablePath = null,
#   pipe = false,
#   env = process.env,
#   handleSIGINT = true,
#   handleSIGTERM = true,
#   handleSIGHUP = true,
#   ignoreHTTPSErrors = false,
#   defaultViewport = {width: 800, height: 600},
#   slowMo = 0,
#   timeout = 30000
# } = options;
# const {
#   devtools = false,
#   headless = !devtools,
#   args = [],
#   userDataDir = null
# } = options;

module Puppeteer::Launcher
  class ChromeArgOptions
    # * @property {boolean=} headless
    # * @property {Array<string>=} args
    # * @property {string=} userDataDir
    # * @property {boolean=} devtools
    def initialize(options)
      @args = options[:args] || []
      @user_data_dir = options[:user_data_dir]
      @devtools = options[:devtools] || false
      @headless = options[:headless]
      if @headless.nil?
        @headless = !@devtools
      end
      @debugging_port = options[:debugging_port] || 0
    end

    attr_reader :args, :user_data_dir, :debugging_port

    def headless?
      @headless
    end

    def devtools?
      @devtools
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
puppeteer-ruby-0.45.6 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.45.5 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.45.4 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.45.3 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.45.2 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.45.2.alpha2 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.45.2.alpha1 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.45.1 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.45.0 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.44.3 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.44.2 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.44.1 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.44.0 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.43.1 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.43.0 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.42.0 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.41.0 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.40.7 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.40.6 lib/puppeteer/launcher/chrome_arg_options.rb
puppeteer-ruby-0.40.5 lib/puppeteer/launcher/chrome_arg_options.rb