Javascript D3 graphics?

Wow I just found the other post in this forum on using vega lite in anvil. So cool. Now I’m very interested.

Would it be possible to 2-way bind to the DOM, so that for example you could build a graph object visually using something like the force editor example in d3.js? I think it would be cool to be able to visually build up a graph in d3.js and have python code on the server side that can react to that graph structure in realtime.