From @paulirish
Hey all,
I wanted to reach out, on behalf of the Chrome team, to discuss headless Chromium, PhantomJS, and some avenues forward. :)
So first up, the headless Chromium team (working mostly in both London and Sydney) is improving the feature set and reliability of the headless build and APIs. Mac and Windows builds (in addition to Linux) are now in good shape.
To be plain: We're very interested in PhantomJS supporting headless Chromium as a runtime.
We'd prefer for headless Chromium to not compete with Phantom. The API we will support is the Chrome Debugging Protocol [0] and there are currently no plans to provide higher-level automation APIs with the ergonomics benefits of the Phantom API.
(Work enabling Selenium/WebDriver support via chromedriver is being tracked [1], but as you and I know, this alone isn't really a gamechanger. :)
Is there interest on your side in adopting Chromium as a runtime? There's some existing documentation [2] around the API and embedding, but admittedly, this would be some work.
I'd also be happy to set up some meeting with appropriate engineers to answer any questions.
Cheers!
[0] https://developer.chrome.com/devtools/docs/debugger-protocol
[1] https://crbug.com/604324
[2] Docs:
* Headless Chromium: https://chromium.googlesource.com/chromium/src/+/master/headless/README.md
* Headless API requirements / PhantomJS: https://docs.google.com/document/u/1/d/13V6Ubq-Xomyjx-J9o8G9UWzz72g_9aSOqlbnu1nhZsg/edit
* Headless Chrome C++ DevTools API: https://docs.google.com/document/u/1/d/1rlqcp8nk-ZQvldNJWdbaMbwfDbJoOXvahPCDoPGOwhQ/edit
@ariya @detro @Vitallium
Any plans to move towards this? Would a PR for this be accepted into core? I'd love to see phantomjs APIs work for headless chrome and am happy to help contribute.
To add some mystery here.. I'm aware of some explorations in this area, though I don't believe there are any announcements. Also no promises. 馃槈
@paulirish Ahh, the suspense is killing me.
In the meantime, we're currently working on a PhantomJS compatibility layer in GhostJS to run integration tests using Headless Chrome. You all have done a fantastic job on the Chrome remote debugger. We would also be interested in making this it's own compatibility layer so something like node-phantom-simple can drive headless chrome. For now we're already able to run tests on Firefox, Chrome, and Phantom using the same text syntax.
https://github.com/KevinGrandon/ghostjs/blob/master/ghostjs-core/src/chrome/index.js#L105-L140
Probably not what most folks here are looking for, but I'm pushing pretty hard to get this project some steam https://github.com/joelgriffith/navalia as it's built on top of headless-chrome (with a Nightmare-like API). There's some small differences, but also some great features as well.
Given our limited resources, likely supporting multiple back-end like this will be a major undertaking.
For the foreseeable future, it means we may need to stick with (Qt)WebKit.
Let's revisit this topic and reopen it once we have a bit more concrete plan.
Most helpful comment
To add some mystery here.. I'm aware of some explorations in this area, though I don't believe there are any announcements. Also no promises. 馃槈