Added missing Proxy PAC URL command line option

This commit is contained in:
Randy Cahyana 2017-02-16 16:37:39 +07:00 committed by Kenneth Shaw
parent e12e5d1f15
commit dc08ecc727

View File

@ -13,6 +13,8 @@ import (
"sync" "sync"
"syscall" "syscall"
"net/url"
"github.com/knq/chromedp/client" "github.com/knq/chromedp/client"
) )
@ -379,6 +381,11 @@ func Proxy(proxy string) CommandLineOption {
return Flag("proxy-server", proxy) return Flag("proxy-server", proxy)
} }
// ProxyPacURL is the Chrome command line option to set the URL of a proxy PAC file.
func ProxyPacURL(pacURL url.URL) CommandLineOption {
return Flag("proxy-pac-url", pacURL.String())
}
// WindowSize is the Chrome command line option to set the initial window size. // WindowSize is the Chrome command line option to set the initial window size.
func WindowSize(width, height int) CommandLineOption { func WindowSize(width, height int) CommandLineOption {
return Flag("window-size", fmt.Sprintf("%d,%d", width, height)) return Flag("window-size", fmt.Sprintf("%d,%d", width, height))