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

Support multiple console.log arguments #10036

Closed
gijsk opened this issue Jan 31, 2011 · 8 comments
Closed

Support multiple console.log arguments #10036

gijsk opened this issue Jan 31, 2011 · 8 comments
Milestone

Comments

@gijsk
Copy link

gijsk commented Jan 31, 2011

GijsKrui...@gmail.com commented:

What steps will reproduce the problem?

  1. Write some trivial JS page that contains:
    var x = 5
    console.log("here's variable x =", x);

What is the expected output?
"foo.html:5 here's variable x = 5"

What do you see instead?
"foo.html:5 here's variable x ="

What version of the product are you using? On what operating system?
phantomjs 1_1_0, tested on both Mint Linux 10 (Julia) (== Ubuntu 10.10 Maverick Meerkat) and Mac OS X 10.6.6

Please provide any additional information below.

Disclaimer:
This issue was migrated on 2013-03-15 from the project's former issue tracker on Google Code, Issue #36.
🌟   9 people had starred this issue at the time of migration.

@ariya
Copy link
Owner

ariya commented Feb 1, 2011

ariya.hi...@gmail.com commented:

For some reason, QtWebKit (inside http://doc.qt.nokia.com/4.7/qwebpage.html#javaScriptConsoleMessage) only passes the first argument.

@gijsk
Copy link
Author

gijsk commented Feb 4, 2011

GijsKrui...@gmail.com commented:

Hmm, so I guess this needs to be directed upstream? Did you do so already? If not, I can take care of it... seems like something the QT people might be willing to fix.

@ariya
Copy link
Owner

ariya commented Feb 4, 2011

ariya.hi...@gmail.com commented:

It needs more investigation. Feel free to create a reduced test case.

@ariya
Copy link
Owner

ariya commented Mar 14, 2011

ariya.hi...@gmail.com commented:

 

 
Metadata Updates

@ariya
Copy link
Owner

ariya commented Mar 29, 2011

ariya.hi...@gmail.com commented:

Issue 69 has been merged into this issue.

@ariya
Copy link
Owner

ariya commented Mar 9, 2012

ariya.hi...@gmail.com commented:

Fixed in ac699a4d90.

 
Metadata Updates

  • Label(s) added:
    • Module-WebPage
  • Milestone updated: Release1.5 (was: FutureRelease)
  • Status updated: Fixed

@ariya ariya closed this as completed Mar 9, 2012
@ariya
Copy link
Owner

ariya commented Mar 17, 2012

netzpi...@bluewin.ch commented:

I saw the commit exactly the day after I implemented my own console in CoffeeScript to work around this issue. Nonetheless my implementation supports more log methods (like debug, warn, etc.), Firebug like string formatting (%d, %i, %f, %o and %s) and comes with a recursive object pretty printer

It may be also useful outside of my project for other PhantomJS users, so have a look at https://github.com/netzpirat/guard-jasmine/blob/master/lib/guard/jasmine/phantomjs/test/console_spec.coffee for the tests and https://github.com/netzpirat/guard-jasmine/blob/master/lib/guard/jasmine/phantomjs/src/console.coffee for the implementation.

@ariya
Copy link
Owner

ariya commented Mar 23, 2012

ariya.hi...@gmail.com commented:

 

 
Metadata Updates

  • Label(s) added:
    • Domain-WebKit

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

No branches or pull requests

2 participants