I have a page source which imports a helper function get_node()
from a custom module. The function returns htl.html`<div id="foo">...</div>`
but only after some calculation. In the source page, I assign const the_node = get_node()
. How do I make subsequent code, e. g. the_node.addEventListener()
wait until the element is returned (as, e.g., display(the_node)
properly does?
The purpose at hand is to create a Dygraph foo
and reactively display its date range foo.xAxisRange()