message: refactor(core): don't use innerHTML in DOMTestComponentRenderer
  The use of innerHTML is unnecessary and causes TrustedType violations.
  PR Close
diff: @@ -20,23 +20,14 @@ export class DOMTestComponentRenderer extends TestComponentRenderer {
  }
  insertRootElement(rootElId: string) {
  - const template = getDOM().getDefaultDocument().createElement('template');
  - template.innerHTML = `<div id="${rootElId}"></div>`;
  - const rootEl = <HTMLElement>getContent(template).firstChild;
  + const rootElement = getDOM().getDefaultDocument().createElement('div');
  + rootElement.setAttribute('id', rootElId);
  // TODO(juliemr): can/should this be optional?
  const oldRoots = this._doc.querySelectorAll('[id^=root]');
  for (let i = 0; i < oldRoots.length; i++) {
  getDOM().remove(oldRoots[i]);
  }
  - this._doc.body.appendChild(rootEl);
  - }
  -}
  -
  -function getContent(node: Node): Node {
  - if ('content' in node) {
  - return (<any>node).content;
  - } else {
  - return node;
  + this._doc.body.appendChild(rootElement);
  }
  }
  