public static function setInnerHtml(\DOMElement $element, $html) {
    $fragment = $element->ownerDocument->createDocumentFragment();
    $fragment->appendXML($html);
    $element->appendChild($fragment);
  }