lorca icon indicating copy to clipboard operation
lorca copied to clipboard

can exclude some args from defaultChromeArgs

Open unlimitun opened this issue 2 years ago • 1 comments

#167 I added a new argument(excludeDefaultArgs) to the New method, which allows excluding specific arguments from the predefined defaultChromeArgs. This is to address the issue of Chrome causing redundant content when using the enable-automation input parameter after deprecating --disable-infobars. Developers can add --enable-automation into this new argument to exclude it.

unlimitun avatar Aug 29 '23 03:08 unlimitun

like this

func main() {
	// Create UI with basic HTML passed via data URI
	ui, err := lorca.New("data:text/html,"+url.PathEscape(`
	<html>
		<head><title>Hello</title></head>
		<body><h1>Hello, world!</h1></body>
	</html>
	`), "", 480, 320, []string{"--enable-automation"}, "--remote-allow-origins=*")
	if err != nil {
		log.Fatal(err)
	}
	defer ui.Close()
	// Wait until UI window is closed
	<-ui.Done()
}

unlimitun avatar Aug 29 '23 03:08 unlimitun