Document API: writeln Requires TrustedHTML instance when trusted types are enforced
Discouraged
This feature may be a candidate for removal from web standards or browsers. The dynamic markup insertion API, which includes document.write(), has "very idiosyncratic behavior" which can be difficult to debug.