If you donāt want to deal with generators, you could initialize gw via requestAnimationFrame:
function draw_gw(props) {
const div = htl.html`<div>`;
requestAnimationFrame(() => gw.embedGraphicWalker(div, props));
return div;
}
Note that you should avoid using global selectors in Observable notebooks, including referencing elements by their ID, as modifying the output of other cells breaks Observableās dataflow and may have unexpected results.