render output to document
This commit is contained in:
parent
f3c9b3bd99
commit
73b739e594
2 changed files with 11 additions and 2 deletions
|
@ -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…
Reference in a new issue