The next step in resolving #103699. The Trusted Types violation here is setting an HTMLElement’s text content by assigning it to .innerHTML. Because in all of the cases the HTMLElement is already created with dom.ts#$ function, the idea is to pass the text as its children argument.
That is to replace: dom.append(parent, $(‘span’)).innerHTML = text with dom.append(parent, $(‘span’, {}, text)).