Thanks, there are indeed proposals (from the earliest WebVR days) for that but unfortunately security (sigh) seems to prevent it from the start. Maybe I should consider an experimental browser…
PS: found a related question Anyone Explored a Codemirror 6 Canvas/WebGL Renderer? - #3 by seflless with similar answers.