vue-toast-notification
Version:
Vue.js toast notification plugin
16 lines (12 loc) • 324 B
JavaScript
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}