source: node_modules/d3-fetch/src/xml.js

Last change on this file was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 291 bytes
Line 
1import text from "./text.js";
2
3function parser(type) {
4 return (input, init) => text(input, init)
5 .then(text => (new DOMParser).parseFromString(text, type));
6}
7
8export default parser("application/xml");
9
10export var html = parser("text/html");
11
12export var svg = parser("image/svg+xml");
Note: See TracBrowser for help on using the repository browser.