render output to document

use_async
jem 4 years ago
parent f3c9b3bd99
commit 73b739e594

@ -5,7 +5,9 @@
<title>masto-embed</title>
</head>
<body>
<div id="root"></div>
<div id="mastodon-timeline">
Here the timeline will appear.
</div>
<script src="js/main.js"></script>
</body>
</html>

@ -49,5 +49,12 @@
(exit-with-error error)
(callback response)))))
(defn render-to-document
[input]
(-> js/document
(.getElementById "mastodon-timeline")
(.-innerHTML)
(set! input)))
(defn init []
(get-mastodon-timeline pprint))
(get-mastodon-timeline render-to-document))
Loading…
Cancel
Save