UNPKG

434 BJavaScriptView Raw
1import fetch from "fetch";
2let fetchUrl = fetch.fetchUrl
3
4export default function(dom, data) {
5
6 var includeTags = [].slice.apply(dom.querySelectorAll("dt-include"));
7
8 includeTags.forEach(el => {
9 let src = el.getAttribute("src");
10 fetchUrl(src, (err, meta, body) => {
11 console.log(err, meta, body);
12 el.innerHTML = body.toString();
13 })
14 });
15 data.bibliography = bibliography;
16 data.citations = citations;
17
18}