I’m not sure I understand. Does it not work in your browser? Or do you mean to work outside of ObservableHQ? In that case there are a couple of options:
- it could be embedded in another page directly from Observable (see here: https://observablehq.com/@observablehq/downloading-and-embedding-notebooks)
- or else you could use setInterval to call a function manually re-rendering the viz every second. That function would contain the `clock` code (and some other bits).
- or you could use another UI framework (React, Svelte, et al) to update update the DOM for each new date state (i.e. every second), again using setInterval(someFn, 1000) to create a ticker to update that state.
All left as an exercise to the reader. Does that help?