export function parseTemplate ( html ) { const template = document . createDocumentFragment ( ) ; const div = document . createElement ( "div" ) ; div . insertAdjacentHTML ( "afterbegin" , html ) ; template . append ( ... div . childNodes ) ; return template ; }