Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do you have a document #13

Open
playgamelxh opened this issue Apr 10, 2018 · 3 comments
Open

Do you have a document #13

playgamelxh opened this issue Apr 10, 2018 · 3 comments

Comments

@playgamelxh
Copy link

No description provided.

@ching631108
Copy link

ching631108 commented Apr 12, 2018

maybe have to read some code. maybe this can help
https://chromedevtools.github.io/devtools-protocol/

@official-ymail-com
Copy link

+1 Document is needed for beginners

@caffme
Copy link

caffme commented Sep 22, 2019

In the README.md Basic usage example there is this example print to PDF:
$devtools->page()->printToPDF($ctx, PrintToPDFRequest::make());

In the same example I was trying to figure out how to get the generated document source. I came up with this by digging through the class heirachy and the chromedevtools docs. It works but it took some digging and I still don't know if it is unnecessarily complicated:
$devtools->dom()->getOuterHTML($ctx, GetOuterHTMLRequest::builder()->setBackendNodeId($devtools->dom()->getDocument($ctx, GetDocumentRequest::builder()->build())->root->backendNodeId)->build())->outerHTML;

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

No branches or pull requests

4 participants