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>
|
<title>masto-embed</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="mastodon-timeline">
|
||||||
|
Here the timeline will appear.
|
||||||
|
</div>
|
||||||
<script src="js/main.js"></script>
|
<script src="js/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -49,5 +49,12 @@
|
||||||
(exit-with-error error)
|
(exit-with-error error)
|
||||||
(callback response)))))
|
(callback response)))))
|
||||||
|
|
||||||
|
(defn render-to-document
|
||||||
|
[input]
|
||||||
|
(-> js/document
|
||||||
|
(.getElementById "mastodon-timeline")
|
||||||
|
(.-innerHTML)
|
||||||
|
(set! input)))
|
||||||
|
|
||||||
(defn init []
|
(defn init []
|
||||||
(get-mastodon-timeline pprint))
|
(get-mastodon-timeline render-to-document))
|
Loading…
Reference in a new issue