4 ms·
How does this magic work? Does VS Code run completely in the browser?
by zaptheimpaler 6y ago
How does this magic work? Does VS Code run completely in the browser?
- brailsafe 6y agoThe desktop app runs on electron, which is Chrome under the covers, so I imagine it doesn't take a tremendous amount of work to just run it straight in the browser.
- pid_0 6y agoI mean, it already basically does
- gunn 6y agohttps://github.com/Microsoft/monaco-editor https://github.com/Microsoft/monaco-editor
- exikyut 6y ago(Electron = Chromium minus tab bar and window borders)
- momothereal 6y agoPlus a Node.js API to interact with the host and create windows, and an IPC system to communicate between the renderer and node processes
- qbasic_forever 6y ago90% of VS Code is typescript that already works fine in the browser. There's just a small layer of nodejs to interface with the local filesystem and run processes. Quite a few projects have existed that pull the core of VS code out into the browser and reimplement the small platform layer on their own: - Eclipse Theia: https://github.com/eclipse-theia/theia https://github.com/eclipse-theia/theia - Coder: https://github.com/cdr/code-server https://github.com/cdr/code-server I'm sure there are countless versions for mobile that are hasty Cordova-based versions of the VS Code core too.
- deleted 6y ago[deleted]
- gbraad 6y agoActually no. On mobile I use termux with coder's code-server and chrome/vivaldi as there is no electron for Android. Not aware of any Cordova based one's.
- mschuetz 6y agoVS Code is essentially a browser app based on Typescript(Javascript) and html. You can even open the chrome dev tools in VS Code (Help -> Toggle Dev Tools) and inspect the html and javascript of VS code. You can also go so far as to change the CSS and html of vs code in the dev tools. Try using the element picker (top left icon in the dev tools) to select an element in vs code, and you'll see that each line of code is a div and each token is a span that is syntax highlighted by CSS classes.
- gspr 6y agoThe world is starting to scare me. I think I'll go live under a rock and wait it out until the pendulum swings back and people stop thinking of the browser as their OS.