Help us shape the future of Go! Take the 2026 Go Developer Survey

eval

command
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Command eval is a chromedp example demonstrating how to evaluate JavaScript and retrieve the result. It reads a page of the local test site and needs no internet. It evaluates scripts on the reference page of the package time and decodes the results into Go values, from a number and a list of strings to a struct and a list of structs. Use -url to give the full URL of a page to read, for example a live site, and the program does not start the local site then. The selectors are written for the local site and a live site can differ. Use -v to print the protocol messages and -visible to show the browser window and leave it open. Use -visible-on-terminal to draw the page in the terminal with terminal graphics.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL