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

Docs: more explanation for page.evaluateHandle() #1014

Closed
ebidel opened this issue Oct 11, 2017 · 6 comments
Closed

Docs: more explanation for page.evaluateHandle() #1014

ebidel opened this issue Oct 11, 2017 · 6 comments

Comments

@ebidel
Copy link
Contributor

ebidel commented Oct 11, 2017

#1003 (comment) mentioned that page.evaluateHandle() can be used to run code in the context of the page, but in a "clean room" environment (e.g. avoiding issues with pages that override native methods). Is that right?

The docs are fuzzy about page.evaluateHandle() being a next context. It mentions an alias to executionContext but I think more info on why you'd use either would be good.

@aslushnikov
Copy link
Contributor

can be used to run code in the context of the page, but in a "clean room" environment (e.g. avoiding issues with pages that override native methods). Is that right?

No, the only difference between evaluate and evaluateHandle is that the former returns a javascript-object, and the latter returns a reference to the in-page object aka JSHandle.

Anybody is welcome to improve docs, we'll be happy to review a PR!

@yelisaveta
Copy link
Contributor

yelisaveta commented Jan 21, 2018

Hi @aslushnikov, I have raised a PR for this issue, please see: #1867

I will be happy to make a PR for this issue as well: #1051

This is my first contribution to open-source project so I am open to any help/advice to my PR. Thanks!

@yanivefraim
Copy link
Contributor

@yelisaveta - are you on #1051? If not, I would like to take it (:

@yelisaveta
Copy link
Contributor

@yanivefraim no I am not, feel free to take it!

@yanivefraim
Copy link
Contributor

yanivefraim commented Apr 27, 2018

@aslushnikov - I believe this was fixed by #1867? (it didn't have 'fixes ...' so no reference to PR here)

@aslushnikov
Copy link
Contributor

@yanivefraim you're right, thanks

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

No branches or pull requests

4 participants