Closed mlucy closed 8 years ago
In this context -- the JS code -- shouldn't it just become:
const Horizon = new Horizon();
This matches the (brand new) Getting Started example. The <script>
tag probably doesn't belong in the API docs; by the time you get there, Horizon is already loaded, one way or another.
Cool, that sounds good then.
(Although it should probably be const hz = Horizon()
instead of const Horizon = Horizon()
, at least the way the page is written now.)
The docs for how to connect to a Horizon server (e.g. on http://horizon.io/api/collection/) tell people to write
const Horizon = require("horizon")
. This has a few problems:The docs should probably instead tell people that they need to put
<script src="/horizon/horizon.js"></script>
somewhere above where they useHorizon
.