$
This commit is contained in:
15
node_modules/riot/esm/utils/dom.js
generated
vendored
Normal file
15
node_modules/riot/esm/utils/dom.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/* 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 };
|
Reference in New Issue
Block a user