Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
/**
* Convert HTML string to DOM element.
*/
const htmlToElement = html => {
const placeholder = document.createElement('div');
placeholder.innerHTML = html;
return placeholder.children.length ? placeholder.firstElementChild : undefined;
};
export default htmlToElement;