From 1a33fe2f7ebbd4067529118135b013a2acefcb3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Vr=C3=A1na?= Date: Tue, 25 Oct 2022 14:51:37 +0200 Subject: [PATCH] Make code compatible with Trusted Types. We want to enforce Trusted Types in Dart tests and this change prepares for that. It also makes the code provably safe. --- lib/web_ui/lib/src/engine/text/font_collection.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web_ui/lib/src/engine/text/font_collection.dart b/lib/web_ui/lib/src/engine/text/font_collection.dart index 74b49b23d1559..7822c55ae7b8a 100644 --- a/lib/web_ui/lib/src/engine/text/font_collection.dart +++ b/lib/web_ui/lib/src/engine/text/font_collection.dart @@ -327,7 +327,7 @@ class _PolyfillFontManager extends FontManager { .join(' '); final DomHTMLStyleElement fontLoadStyle = DomHTMLStyleElement(); fontLoadStyle.type = 'text/css'; - fontLoadStyle.innerHtml = '@font-face { $fontFaceDeclaration }'; + fontLoadStyle.text = '@font-face { $fontFaceDeclaration }'; domDocument.head!.append(fontLoadStyle); // HACK: If this is an icon font, then when it loads it won't change the