manifestJson
The text of a web app manifest: compact JSON (as Next writes it) with the display mode and every address checked.
The text of a web app manifest: compact JSON (as Next writes it) with the display mode and every address checked. An
address (start_url, scope, id, and any url, src, action or href below) is a relative path or an http(s)
URL, and an image src may be an inline data:image/...; javascript:, vbscript:, file:, other data: URLs, a
protocol-relative //host and a backslash start are refused. <, >, &, U+2028 and U+2029 are written as \uXXXX
escapes (the same value in JSON), so the text is safe wherever it is embedded.
Import#
ts
import { manifestJson } from "@shadow-js/dusk/server";
Signature#
ts
function manifestJson(manifest: Manifest): string
Parameters#
| Name | Description |
|---|---|
manifest |
The manifest. |
Returns#
The JSON text.
Throws#
- RangeError for an unknown display mode, or a manifest nested past 8 levels.
- TypeError for an address that is not allowed.