This module provides a bunch of helper functions to work with XML documents.
Converts the specified XML node to a DATA:URI string.
DATA:URI
import { toDataURI } from 'core/xml';import { getDataTypeFromURI } from 'core/mime-type';const node = document.createElement('foo');node.innerHTML = 'hello';// "data:image/svg+xml;%3Cfoo xmlns='http://www.w3.org/1999/xhtml'%3Ehello%3C/foo%3E"console.log(toDataURI(node));// documentconsole.log(getDataTypeFromURI(toDataURI(node)));
Converts the specified XML node to a DATA:URI string
core/xml
This module provides a bunch of helper functions to work with XML documents.
toDataURI
Converts the specified XML node to a
DATA:URI
string.