Live data from Hacker News

Chrome 59 has cross-platform headless support

chromestatus.com

81–90 of 161 posts

Re: Chrome 59 has cross-platform headless support

#81

This is fantastic. I'm using a combination of Chrome and PhantomJS for karma testing right now, for https://github.com/paypal/paypal-checkout and https://github.com/krakenjs/xcomponent . There are hundreds of tests opening up hundreds of iframes and popup windows, and sending a lot of cross-window messages, and that ends up being really memory hungry. Chrome deals pretty well with garbage collection, so long as I'm c…

I've been using post-robot and xcomponent a lot recently as I'm solving a bunch of similar challenges. Just wanted to say thank you for sharing your solutions and expertise.

Glad they're working out for you! Let me know if you encounter any interesting situations they don't support.

Re: Chrome 59 has cross-platform headless support

#82

This is fantastic. I'm using a combination of Chrome and PhantomJS for karma testing right now, for https://github.com/paypal/paypal-checkout and https://github.com/krakenjs/xcomponent . There are hundreds of tests opening up hundreds of iframes and popup windows, and sending a lot of cross-window messages, and that ends up being really memory hungry. Chrome deals pretty well with garbage collection, so long as I'm c…

We (Chrome) have reached out to PhantomJS to inquire if they're interested in collaborating: https://groups.google.com/d/msg/phantomjs-dev/S-mEBwuSgKQ/tU... The DevTools Protocol is the primary API for headless Chrome, but we are excited for higher-level abstractions like PhantomJS & NightmareJS's API to manipulate the browser as well. Plenty of details to work out, but hopefully sometime this year you'll get a drop-…

It was my understanding that Google's crawler literally is Chrome. Does Google have any plans to open source those parts of the browser to make integration easier? Maybe I was mistaken

Re: Chrome 59 has cross-platform headless support

#83
post #37

Please let this be capable of generating PDFs from HTML from the command line.

If you're willing to wait until Electron releases a Chrome 59 -based build, I'll be updating https://github.com/mixu/electroshot which handles screenshots and print-to-PDF along with a bunch of other niceties.

Does it support paged media?

Re: Chrome 59 has cross-platform headless support

#84
post #37

Please let this be capable of generating PDFs from HTML from the command line.

If you're willing to wait until Electron releases a Chrome 59 -based build, I'll be updating https://github.com/mixu/electroshot which handles screenshots and print-to-PDF along with a bunch of other niceties.

Does it support paged media?

Re: Chrome 59 has cross-platform headless support

#85
post #54
post #9

Earlier quoted context omitted.

Yes: https://chromedevtools.github.io/debugger-protocol-viewer/to...

https://wkhtmltopdf.org/ You can download the two tools wkhtmltopdf and wkhtmltoimage which use WebKit to generate pdfs/images.

No paged media makes page formatting much too painful.

Re: Chrome 59 has cross-platform headless support

#86
post #9

Please let this be capable of generating PDFs from HTML from the command line.

Yes: https://chromedevtools.github.io/debugger-protocol-viewer/to...

The print to pdf command currently only support default print settings. Adding support for customized page size, header and footer, dpi, etc. is in progress.

Please see bug: https://bugs.chromium.org/p/chromium/issues/detail?id=603559 for updates.

Re: Chrome 59 has cross-platform headless support

#87
post #54
post #9

Earlier quoted context omitted.

Yes: https://chromedevtools.github.io/debugger-protocol-viewer/to...

https://wkhtmltopdf.org/ You can download the two tools wkhtmltopdf and wkhtmltoimage which use WebKit to generate pdfs/images.

I'm the maintainer of wkhtmltopdf, and it's hopelessly out of date. There's still some bugs in the Chrome print-to-PDF support as support was added just a few days ago:

https://bugs.chromium.org/p/chromium/issues/detail?id=603559

Not sure if all the full functionality that wkhtmltopdf can be ported, it had patches to Qt/WebKit to enable that ... probably will need API enhancements in Chrome. Don't have the time right now, but I registered http://crhtmltopdf.org a while ago hoping that I'd get around to it.

Re: Chrome 59 has cross-platform headless support

#88

Nice!! Would creating WebRTC data channel be possible? server side SCTP to client(p2p over SCTP/data channel) would be cool.

It's already possible. I'm using webrtc and node-electron to connect a golang server for my MMO project. I have a farm of 4 nodejs processes running under tmux acting as proxies for unreliable communications. https://www.emergencevector.com

Which WebRTC library are you using on the golang server? Last time I looked, I couldn't find anything stable.

Re: Chrome 59 has cross-platform headless support

#90
post #86
post #9

Earlier quoted context omitted.

Yes: https://chromedevtools.github.io/debugger-protocol-viewer/to...

The print to pdf command currently only support default print settings. Adding support for customized page size, header and footer, dpi, etc. is in progress. Please see bug: https://bugs.chromium.org/p/chromium/issues/detail?id=603559 for updates.

Excellent news, thanks!
Post reply on HN