Sha256: 264d9afa638a5b5e6b00c6713797db08f5f3b4877297ccf63cb1081e13f103e4

Contents?: true

Size: 1.08 KB

Versions: 42

Compression:

Stored size: 1.08 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 BrowserOptions
    # @property {boolean=} ignoreHTTPSErrors
    # @property {(?Puppeteer.Viewport)=} defaultViewport
    # @property {number=} slowMo
    def initialize(options)
      @ignore_https_errors = options[:ignore_https_errors] || false
      # `default_viewport: nil` must be respected here.
      @default_viewport = options.key?(:default_viewport) ? options[:default_viewport] : Puppeteer::Viewport.new(width: 800, height: 600)
      @slow_mo = options[:slow_mo] || 0
    end

    attr_reader :default_viewport, :slow_mo

    def ignore_https_errors?
      @ignore_https_errors
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
puppeteer-ruby-0.40.7 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.40.6 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.40.5 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.40.4 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.40.3 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.40.2 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.40.1 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.40.0 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.39.0 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.38.0 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.37.4 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.37.3 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.37.2 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.37.1 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.37.0 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.36.0 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.35.1 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.35.0 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.34.3 lib/puppeteer/launcher/browser_options.rb
puppeteer-ruby-0.34.2 lib/puppeteer/launcher/browser_options.rb