Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
PhantomJS 2 (github.com/ariya)
116 points by tbassetto on Feb 2, 2015 | hide | past | favorite | 23 comments


Why are information about how to build PhantomJS 2 important?

edit: http://phantomjs.org/release-2.0.html has more meaningful information


It appears they've moved forward to Qt5 but they're still running on QtWebKit. This is a bad situation since QtWebKit has been deprecated (read: nobody has publicly committed to writing any new code for it, not least Digia) in favour of QtWebEngine, which doesn't have even 10% of the API richness of the old module.

WebEngine implements process separation and is based on Blink, whereas WebKit was in-process and e.g. allowed direct access to DOM from C++.

The job of moving PJS to WebEngine, if possible, when it happens will basically be the same effort as a rewrite. This release looks like a stopgap to get the best of the old WebKit line, but calling it 2.0 seems a bit shortsighted -- 2.0 should be kept for the WebEngine series if/when it happens.


The most important thing we wanted to achieve was to get a fresh version of QtWebkit. Which was not possible without upgrading to Qt5. We had plans to switch to QtWebEngine in future versions. But in current state, we're thinking about moving to Chromium.


Does it support webfonts yet (making it finally useful for screenshot capture)?


I've been using 2.0 for a couple months now because of webfont issues with 1.9, they work now.


Only on Linux and OS X. Windows version doesn't support WebFonts yet. We will enable them in the next minor release (2.0.1). It will be available shortly.


I'd really like PhantomJS to declare issue bankruptcy on their Github repo, which is currently a whopping 1,367 issues, many of which are just pastes of core dumps with no replies.

Wiping the slate clean with Phantom 2, combined with any changes that enable more contributors to fight down the issues list, could lead to PhantomJS being a much more solid project.


Any chance for headless browser/testing stack with webgl support (mesa, llvm, even less than 1 fps would be enough)?


Definitely not in PhantomJS 2 with QtWebkit. May be after we will switch to Chromium.


Can anyone actually explain what is so important in Version 2? All I can see in release-2.0 notes, is an upgrade to Qt5


There are better release notes in the download:

---

2015-01-23: Version 2.0.0

    New features

      * Switched to Qt 5 and updated WebKit (issue 10448)
      * Implemented clearing of memory cache (issue 10357)
      * Added support for HTTP header change for every request (issue 11299)

    Improvements

      * Fixed rendering of CJK text by always linking the codecs (issue 10249)
      * Ensured onResourceReceived is still fired on an error (issue 11163)
      * Fixed possible crash in handling network requests (issue 11252)
      * Removed hardcoded GhostDriver launching message (issue 12681)
      * Allowed disk cache more than 2 GB (issue 12303)

    Examples

      * Netsniff example should exit when fails to load (issue 11333)
---


Function.prototype.bind[1] issue was quiet painful to many, so this release will be a relief.

[1]https://github.com/ariya/phantomjs/issues/10522


Phantom 1.x was using an ancient version of WebKit.


"A: If you want to know HTML5/CSS3/other features supported by PhantomJS, using WebKit version is not a good idea. See Supported Web Standards documentation page for details.

If you really like to get the WebKit version, find it via the user agent, run the examples/useragent.js. The actual version depends on the libraries with which PhantomJS was compiled."

I can't understand this. Why is it bad to know that they use webkit X? When I was struggling with previous versions of PJS the soulition was to realize what I wanted wasn't supported in that version so I needed a workaround.


And the answer is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.0.0 Safari/538.1

This means that HTML/CSS3 feature set is up to Chrome 28


I tried to compile this a while back on an ec2 micro and ran out of memory.

Compiled binaries: http://phantomjs.org/download.html


The official OSX build (http://phantomjs.org/download.html) crashes for me with

Killed: 9


I had the same problem, so I found a small patch[1] and recompiled several binaries, including one for OSX [2]

edit: a pull request has now been submitted and accepted [3]

[1] https://qt.gitorious.org/qt/qtbase/commit/70e4428b6f1c6a4bad... [2] https://github.com/eugene1g/phantomjs/releases [3] https://github.com/ariya/phantomjs/pull/12934


Yep, same. Issue noted on Github https://github.com/ariya/phantomjs/issues/12630


Finally! is that official?


Kind of. Before we will do official announcement we have to complete following things: - compile binaries for Linux X86/X64 - update links/information blocks on our web site.


Thank you for the hard work on this major version release. I use it in a side project and PhantomJS2 has greatly improved it's performance among other things.


Guess so. From their project page[1]:

> The latest stable release is version 2.0.

[1]: https://github.com/ariya/phantomjs




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: