/** * Quick type checking * @param {*} element - anything * @param {string} type - type definition * @returns {boolean} true if the type corresponds */ export function checkType(element, type) { return typeof element === type } /** * Check if an element is part of an svg * @param {HTMLElement} el - element to check * @returns {boolean} true if we are in an svg context */ export function isSvg(el) { const owner = el.ownerSVGElement return !!owner || owner === null } /** * Check if an element is a template tag * @param {HTMLElement} el - element to check * @returns {boolean} true if it's a