ember-metrics
Version:
Send data to multiple analytics integrations without re-implementing new API
11 lines (10 loc) • 302 B
text/typescript
/**
* Remove scripts defined by selectors from DOM.
*
* @param selectors One or more DOM selectors to match against.
*/
export default function removeFromDOM(selectors: string): void {
document.querySelectorAll(selectors).forEach((el: Element) => {
el.parentElement?.removeChild(el);
});
}