chore: fix TrustedTypes policy in chrome://accessibility (#38179)

chore: fix TrustedTypes policy in chrome://accessibility
This commit is contained in:
Shelley Vohr 2023-05-08 10:39:04 +02:00 committed by GitHub
parent 13be6dc8b4
commit a6c9aefb4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -321,6 +321,10 @@ ElectronAccessibilityUI::ElectronAccessibilityUI(content::WebUI* web_ui)
base::BindRepeating(&HandleAccessibilityRequestCallback,
web_ui->GetWebContents()->GetBrowserContext()));
html_source->OverrideContentSecurityPolicy(
network::mojom::CSPDirectiveName::TrustedTypes,
"trusted-types parse-html-subset sanitize-inner-html;");
web_ui->AddMessageHandler(
std::make_unique<ElectronAccessibilityUIMessageHandler>());
}