Skip to content

Commit

Permalink
Add remove function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jannik Zschiesche committed Jun 29, 2017
1 parent 657c9b3 commit d5dbad8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dom/manipulate.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,13 @@ export function setAttrs (element, attributes)
);
}


/**
* Removes the given element
*
* @param {HTMLElement} element
*/
export function remove (element)
{
element.parentNode.removeChild(element);
}

0 comments on commit d5dbad8

Please sign in to comment.