HTML options
Trusted HTML inserted verbatim into <body>.
Optionalcsp?: stringCSP meta content, normally produced by generateCSP.
Optionalnonce?: stringApplied to generated script elements.
Optionalscripts?: string[]Script URIs; attribute-escaped but not checked against the CSP.
Optionalstyles?: string[]Stylesheet URIs; attribute-escaped but not checked against the CSP.
Optionaltitle?: stringEscaped document title.
Complete HTML document
Creates a basic HTML structure for a webview.
bodyis trusted HTML andcspis optional; omitting it does not create a safe policy automatically. The generated document declareslang="en". Use a localized template throughsetHtmlFromTemplatewhen another document language is required.