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

Support custom protocols #320

Merged
merged 1 commit into from
Aug 9, 2024
Merged

Support custom protocols #320

merged 1 commit into from
Aug 9, 2024

Conversation

maltoe
Copy link
Collaborator

@maltoe maltoe commented Jul 28, 2024

This patch makes the API more versatile by allowing to run custom protocols.

  • add :protocol option to print_to_pdf/2 & capture_screenshot/2
  • refactor API & options handling around chrome_export/2
  • add new top-level, but hidden run_protocol/2 API

For the time being, these features are not advertised in the documentation. The ChromicPDF.Protocol machinery can be quite tricky and the poor DSL in ChromicPDF.ProtocolMacros is subject to change. Nonetheless, this could be a way to avoid adding further options to change and extend the default protocols' behaviour.

Relates to #319

@maltoe maltoe force-pushed the custom-protocols branch 8 times, most recently from d859b15 to e365e6f Compare July 28, 2024 16:03
This patch makes the API more versatile by allowing to run custom protocols.

- add :protocol option to `print_to_pdf/2` & `capture_screenshot/2`
- refactor API & options handling around `chrome_export/2`
- add new top-level but hidden `run_protocol/2` API

For the time being, these features are not advertised in the documentation. The
`ChromicPDF.Protocol` machinery can be quite tricky and the poor DSL in
`ChromicPDF.ProtocolMacros` is subject to change. Nonetheless, this could be a way
to avoid adding further options to change and extend the default protocols' behaviour.

Relates to #319
@maltoe maltoe force-pushed the custom-protocols branch from e365e6f to 627c8fd Compare August 1, 2024 07:56
@maltoe maltoe merged commit dbb7577 into main Aug 9, 2024
5 checks passed
@maltoe maltoe deleted the custom-protocols branch August 9, 2024 15:39
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

Successfully merging this pull request may close these issues.

1 participant