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

Callbacks not working in WebPage.evaluate #284

Open
forced-request opened this issue Dec 23, 2014 · 1 comment
Open

Callbacks not working in WebPage.evaluate #284

forced-request opened this issue Dec 23, 2014 · 1 comment

Comments

@forced-request
Copy link

I'm troubleshooting some issues with the Slimerjs functionality behind xssValidator and discovered that the callbacks don't appear to be working the same way they do in Phantom.JS

The following code snippet will log the alert properly within Phantom, but not within Slimer:

wp = require("webpage").create();
wp.onAlert = function(text) {
    console.log("Alerted: " + text);
};

wp.content = "<html><body>Hello: <iframe src='f' onerror='prompt(299792458)'></iframe><script>window.alert(\"Normal Func\")</script></body></html>";
wp.evaluate(function (wp) {

}, wp);
@forced-request
Copy link
Author

Hi @laurentj, I wanted to check to see whether there has been any progress in resolving this issue.

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