UNPKG

vue-toast-notification

Version:
16 lines (12 loc) 324 B
const removeElement = (el) => { if (typeof el.remove !== 'undefined') { el.remove() } else { el.parentNode.removeChild(el) } }; const hasWindow = () => { return typeof window !== 'undefined'; }; const HTMLElement = hasWindow() ? window.HTMLElement : Object; export {removeElement, hasWindow, HTMLElement}