Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can exclude some args from defaultChromeArgs #191

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

unlimitun
Copy link

#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
Copy link
Author

unlimitun commented Aug 29, 2023

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()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant