interface Page

Returned by parsePage: what a page says about itself, entities decoded, values trimmed and URLs absolute.

Properties

optional
title: string

The text of the <title> element.

optional
themeColor: string

The theme-color, as written: pass it to normalizeCssColor.

optional
maskIconColor: string

The color of the Safari pinned-tab icon, as written.

optional
bestIcon: string

The largest icon the page links, which the thumbnail placeholder draws.

optional
largeImage: string

The first image declared at least 200 pixels both ways.

optional
firstContentImage: string

The first image that doesn't look like page furniture.

Methods

meta(key: string): string | undefined

Returns the content of the first <meta> whose property or name is key, in any case: sites write og: tags under either attribute, and Twitter's too.

Usage

import { type Page } from "api/remote/html.ts";