Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

onConsoleMessage handler receives just the first parameter passed to console.log #15180

Closed
leandrohmanica opened this issue Oct 30, 2017 · 1 comment
Labels

Comments

@leandrohmanica
Copy link

  1. Which version of PhantomJS are you using? Tip: run phantomjs --version.
    2.1.1
  2. What steps will reproduce the problem?
  • Write a onConsoleMessage handler in the phantom script.
  • Load a webpage that calls console.log with more than one parameter.
  • onConsoleMessage handler receives just the first passed to console.log function.
  1. Which operating system are you using?
    Linux Mint 18.3
  2. Did you use binary PhantomJS or did you compile it from source?
    Binary
  3. Please provide any additional information below.
    Example:
    //index.js
    var page = require('webpage').create();
    page.onConsoleMessage = function (msg) {
    console.log(msg);
    };
    page.open('./index.html', function(status) {
    phantom.exit();
    });
    <!-- index.html -->
    <html>
    <head>
    <script>
    console.log('hello', 'world!');
    </script>
    </head>
    <body></body>
    </html>

And then run phantomjs index.js
Expected result:
Terminal prints:
hello world!
Actual result:
hello

@stale stale bot added the stale label Dec 26, 2019
@stale
Copy link

stale bot commented Dec 29, 2019

Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

@stale stale bot closed this as completed Dec 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant