Documentation ¶
Overview ¶
Package rendering provides a function to render HTML to images or HTML after JS execution. It uses the Chrome Debug Protocol through the rod package. It will download a headless Chrome version if needed that matches the current platform.
If the environment variable SND_CHROME_DEBUG=1 it will start the chrome instances in non-headless mode.
Index ¶
Constants ¶
View Source
const IdleRequestTimeout = 5
View Source
const ReadyTimeout = 5
Variables ¶
This section is empty.
Functions ¶
func ExtractHTML ¶ added in v0.5.0
ExtractHTML opens the URL, lets the page executes and returns the HTML.
func InitBrowser ¶ added in v0.7.0
func InitBrowser()
func RenderHTML ¶
RenderHTML renders the element #content into an image.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.