Skip to content
Meeko
Type to search the guides and the API reference. Open it from any page with / or Ctrl K; move with the arrow keys and open a result with Enter.
Get started

Contents

On this page

Not translated yet

This page has not been translated into English yet, so it is shown in Spanish.

InlineScriptReport

interfaz Since 1.3.0

Resultado de inlineScriptHashes.

ts
import type { InlineScriptReport } from "@meekojs/meeko/build";

Source code src/framework/script-hashes.ts:19

Declaración #

ts
interface InlineScriptReport {
	readonly hashes: readonly string[]
	readonly unhashable: readonly string[]
}

Example #

ts
import { inlineScriptHashes } from "@meekojs/meeko/build";
import type { InlineScriptReport } from "@meekojs/meeko/build";

const report: InlineScriptReport = inlineScriptHashes("<script>console.log(1)</script>");
console.log(report.hashes, report.unhashable);

Propiedades #

hashes #

propiedad sólo lectura

readonly hashes: readonly string[]

Fuentes CSP 'sha256-<base64>' de los scripts en línea ejecutables, ordenadas y sin repetir.

unhashable #

propiedad sólo lectura

readonly unhashable: readonly string[]

JavaScript del documento que ningún hash puede permitir en script-src: atributos on* (<button onclick>) y URL javascript: (<a href="javascript:…">), descritos para un mensaje de error.

See also #

Was this page helpful?

Add a comment

It is sent when you choose “Yes” or “No”. Only the page, your answer and the comment are stored: no cookies and no personal data.

0 of 2000 characters

Edit on GitHub: packages/meeko/src/framework/script-hashes.ts