vanillajs-browser-helpers
Version:
Collection of convenience code snippets (helpers) that aims to make it a little easier to work with vanilla JS in the browser
17 lines (16 loc) • 451 B
TypeScript
/**
* Gets the inner XML structure as a string from a XML element
* (like innerHTML but for XML elements - eg. in SVG)
*
* @param XMLNode - The XML node to grab the inner XML structure from
* @return The inner XML structure
*
* @example
*
* ```ts
* // String is already HTML so it is returned as is
* innerXML(<svg><g><path /></g></svg>);
* // -> '<g><path /></g>'
* ```
*/
export default function innerXML(XMLElement: Element): string;