138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
# File 'lib/puppeteer/launcher/firefox.rb', line 138
def initialize(chrome_arg_options)
firefox_arguments = ['--no-remote', '--foreground']
if chrome_arg_options.user_data_dir
firefox_arguments << "--profile"
firefox_arguments << chrome_arg_options.user_data_dir
end
if chrome_arg_options.headless?
firefox_arguments << '--headless'
end
if chrome_arg_options.devtools?
firefox_arguments << '--devtools'
end
if chrome_arg_options.args.all? { |arg| arg.start_with?('-') }
firefox_arguments << 'about:blank'
end
firefox_arguments.concat(chrome_arg_options.args)
@firefox_arguments = firefox_arguments
end
|