import {clearChildren, removeChild} from '@riotjs/util/dom' import {IS_PURE_SYMBOL} from '@riotjs/util/constants' import createBinding from './binding' import createDOMTree from './util/create-DOM-tree' import injectDOM from './util/inject-DOM' import {isTemplate} from '@riotjs/util/checks' import {panic} from '@riotjs/util/misc' /** * Create the Template DOM skeleton * @param {HTMLElement} el - root node where the DOM will be injected * @param {string|HTMLElement} html - HTML markup or HTMLElement that will be injected into the root node * @returns {?DocumentFragment} fragment that will be injected into the root node */ function createTemplateDOM(el, html) { return html && (typeof html === 'string' ? createDOMTree(el, html) : html) } /** * Get the offset of the