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

allow passing nil as res to chromedp.Evaluate() #816

Merged
merged 2 commits into from May 10, 2021

Conversation

ZekeLu
Copy link
Member

@ZekeLu ZekeLu commented May 8, 2021

Related issues: #526, #658

Sometimes, users just want to call a js function (for example, window.scrollTo(0, 0)), and don't care about the returned value. So it's not necessary to force res to not be nil.

It also updates the doc comment to describe that in some cases, "undefined" will result in an error.

Sometimes, users just want to call a js function (for example,
window.scrollTo(0, 0)), and don't care about the return value.
So it's not necessary to force res to not be nil.
And it eliminates the case that "undefined" results in an error.
@ZekeLu ZekeLu merged commit 864094d into chromedp:master May 10, 2021
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.

Evaluating js function: encountered an undefined value
1 participant