simplesvg
Version:
A very simple svg wrapper, inspired by original vivagraph
15 lines (12 loc) • 335 B
JavaScript
module.exports = createDomparser();
function createDomparser() {
if (typeof DOMParser === 'undefined') {
return {
parseFromString: fail
};
}
return new DOMParser();
}
function fail() {
throw new Error('DOMParser is not supported by this platform. Please open issue here https://github.com/anvaka/simplesvg');
}