UNPKG

@deltares/fews-ssd-requests

Version:

Library for making requests to the FEWS SSD webservice

16 lines 583 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SvgElementParser = void 0; class SvgElementParser { async parse(response) { const parser = new DOMParser(); const text = await response.text(); const svgDoc = parser.parseFromString(text, "text/xml"); const element = svgDoc.querySelector('svg'); if (element === null) throw new Error('respsonse does not contain a svg'); return element; } } exports.SvgElementParser = SvgElementParser; //# sourceMappingURL=svgElementParser.js.map