ggrossetie / asciidoctor-web-pdf

Convert AsciiDoc documents to PDF using web technologies
https://asciidoctor.org
MIT License
445 stars 92 forks source link

Auto-open DevTools using preview option? #539

Open ggrossetie opened 3 years ago

ggrossetie commented 3 years ago

Discussed in https://github.com/Mogztter/asciidoctor-web-pdf/discussions/486

Originally posted by **wh81752** May 11, 2021 When using option --preview is there a way to auto-open Chromium's DevTools? Passing option `--auto-open-devtools-for-tabs` appears to do the job using Chrome Browser according to this article: https://developer.chrome.com/docs/devtools/open So I wonder whether there is a way to pass this and perhaps other options down to Chromium.
ggrossetie commented 3 years ago

I don't think we should do it by default but that's a good idea! We can add an option named --auto-open-devtools that will pass the --auto-open-devtools-for-tabs in:

https://github.com/Mogztter/asciidoctor-web-pdf/blob/339b485188e797a2fe88d025bba005e1751f87ab/lib/browser.js#L151