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

evaluateAsync reports Wrong use of WebPage#evaluateAsync #14

Closed
coolaj86 opened this issue Dec 2, 2013 · 3 comments
Closed

evaluateAsync reports Wrong use of WebPage#evaluateAsync #14

coolaj86 opened this issue Dec 2, 2013 · 3 comments

Comments

@coolaj86
Copy link

coolaj86 commented Dec 2, 2013

page.evaluateAsync(function () {
    window.callPhantom({ msg: "hello" })
}, function (err, data) {
    if (err) { console.log(err); }
    console.log(data);
});
@coolaj86
Copy link
Author

coolaj86 commented Dec 2, 2013

I found that calling .toString() on the first function being passed in causes this to work partially. However, the callback function receives no data.

page.evaluateAsync(function () {
    window.callPhantom({ msg: "hello" })
}.toString(), function (err, data) {
    if (err) { console.log(err); }
    console.log(data);
});

@puzrin
Copy link
Contributor

puzrin commented Jul 9, 2015

Is is still a problem? Is it related to this project? Did you tried to run your script directly in phantomjs from CLI?

@puzrin
Copy link
Contributor

puzrin commented Aug 1, 2015

Closing - timed out.

@puzrin puzrin closed this as completed Aug 1, 2015
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

2 participants