|
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 | |
|---|
| 1 | import text from "./text.js";
|
|---|
| 2 |
|
|---|
| 3 | function parser(type) {
|
|---|
| 4 | return (input, init) => text(input, init)
|
|---|
| 5 | .then(text => (new DOMParser).parseFromString(text, type));
|
|---|
| 6 | }
|
|---|
| 7 |
|
|---|
| 8 | export default parser("application/xml");
|
|---|
| 9 |
|
|---|
| 10 | export var html = parser("text/html");
|
|---|
| 11 |
|
|---|
| 12 | export var svg = parser("image/svg+xml");
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.