browser

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package browser is the Browser module: web pages in windows, for the owner and the agent.

A window shows a page in a frame when the site allows it, and otherwise (or on request) in reader mode: the page as the server read it, words and links only. The agent reads pages on the server (browser_read), never through the owner's frame, so what it sees is the same whether a window is open or not, and a page's scripts never reach it.

A window's state lives in its args: url, history (a list of URLs) and at (the position in it), so back and forward survive a reload and a saved layout reopens the same pages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct {
	Text string `json:"text"`
	URL  string `json:"url"`
}

Link is one link on a page.

type Page

type Page struct {
	URL      string `json:"url"`
	FinalURL string `json:"final_url"`
	Title    string `json:"title"`
	Text     string `json:"text"`
	Links    []Link `json:"links,omitempty"`
	// Framable says whether the site lets another page show it in a frame.
	Framable bool   `json:"framable"`
	Fetched  string `json:"fetched"`
}

Page is a web page as the server read it: its words and its links, without its scripts.

type Result

type Result struct {
	Title   string `json:"title"`
	URL     string `json:"url"`
	Snippet string `json:"snippet,omitempty"`
}

Result is one search result.

Jump to

Keyboard shortcuts

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