parcoursup/node_modules/riot/esm/utils/dom.js

16 lines
400 B
JavaScript
Raw Normal View History

2023-03-05 13:23:23 +01:00
/* Riot WIP, @license MIT */
import { IS_DIRECTIVE } from '@riotjs/util';
import { get } from 'bianco.attr';
/**
* Get the tag name of any DOM node
* @param {HTMLElement} element - DOM node we want to inspect
* @returns {string} name to identify this dom node in riot
*/
function getName(element) {
return get(element, IS_DIRECTIVE) || element.tagName.toLowerCase();
}
export { getName };