@roly and @stephan I may have a similar problem but not sure. I am trying to embed a cables.gl patch in the Observable notebook (which is perfect for js). Cables.gl does load but “steals focus” by shifting the scrolling to the Cables.gl patch when I want the notebook to start and (stay!) at the beginning of the document. I’ve looked all over the web for solutions, including trying two sandbox settings. Here is the iframe (with angle brackets deleted otherwise it gets interpreted):
iframe sandbox=“allow-scripts allow-same-origin” src=“https://cables.gl/edit/fNk8lj” frameborder = “0” style="width:900px; height:600px;"iframe
I tested the sandbox attribute, trying to limit cables.gl but “allow-scripts” and “allow-same-origin” must be set in in the iframe. Otherwise, the cable.gl will not load into Observable. I can always just delete the part of the notebook that launches cables.gl but that would be sad- as cables.gl is a nice example of javascript data flow (which produces graphics).
I’ll read over the links you posted for other solutions.
Here is the complete Observable notebook. Note when loaded (after about 5-10 secs), focus is lost to cables.gl: https://observablehq.com/@metaphorz/the-snake-that-ate-its-tail