UNPKG

radi

Version:

**Radi** is a tiny javascript framework.

17 lines (14 loc) 376 B
import GLOBALS from '../consts/GLOBALS'; /** * @param {string} tagName * @param {function} onmount * @param {function} ondestroy * @returns {object} */ const customTag = (tagName, onmount, ondestroy) => GLOBALS.CUSTOM_TAGS[tagName] = { name: tagName, onmount: onmount || (() => {}), ondestroy: ondestroy || (() => {}), saved: null, }; export default customTag;