diff options
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/feed.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/js/feed.js b/src/js/feed.js new file mode 100644 index 0000000..a80af9c --- /dev/null +++ b/src/js/feed.js @@ -0,0 +1,10 @@ +function loadFeed(callback){ + var myRequest = new Request('/feed'); + fetch(myRequest).then(function(response) { + return response.text(); + }).then(function(response) { + console.log(response); + document.getElementById("feed").innerHTML = response; + callback() + }); +} |