-
Notifications
You must be signed in to change notification settings - Fork 70
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
onLoadFinished arguments wrong with SlimerJS #133
Comments
Suggestions? No idea why that magic with wrap/unwrap arrays was done, looks suspicious. It existed in v1.0 and we did not changed anything there. I have no principal objection to bump version to 3.0 and remove all legacy mess. @baudehlo may be you remember something about that code :) ? |
My suggestion would be to always use |
I have no recollection of anything - sorry - I haven't worked on this code On Thu, May 12, 2016 at 10:43 AM, Alex Layton [email protected]
|
@awlayton could you do a PR with test? |
I am working on a paper right now. I might be able to get to it this weekend, maybe. |
I tried to make a test, but now I can't get the bug to happen @puzrin. What SlimerJS were you using @winghouchan? |
I'm using SlimerJS 0.10.0 @awlayton. |
I have a feeling that the problem caused by using const webPage = require('webpage');
const page = webPage.create();
page.onConsoleMessage = (msg, lineNum, sourceId) => {
console.log(`CONSOLE: ${msg} (from line #${lineNum} in ${sourceId})`);
}; However a Perhaps more investigation is required to see how far this issue expands exactly. |
Yes the problem potentially affects all callbacks @winghouchan. Perhaps you have more time to make a test and fix for this issue? |
I'm certainly open to putting a PR together for this. However my time is also limited so it won't be something I'm prioritising right now. |
After last surprise with banned slimerjs downloads on travis, i decided to spend some resources to significantly improve things. And we transparently migrated our testing lib to |
Can we except a merge ? |
SlimerJS passes 3 arguments to the onLoadFinished callback, while PhantomJS only passes 1.
If one registers an onLoadFinished callback taking 1 argument and is using SlimerJS, the callback will be called with an array of the 3 arguments as the first argument.
I believe the problem stems from this section. It appears this issue will happen whenever the callback has one argument but is called with multiple arguments.
This is related to johntitus/node-horseman#180
The text was updated successfully, but these errors were encountered: