Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create elements in vscode extension

Doesn't vscode support creating element and DOM manipulations? I've read the api referrence but cannot figure out how to get the handle of document. I'm looking for something equivalent to workspaceElement = atom.views.getView(atom.workspace) in atom.

like image 501
Zen Avatar asked Oct 27 '25 10:10

Zen


1 Answers

VSCode does not expose the DOM, the only DOM manipulations that can be performed are through the API calls like decorations. Here is a sample of the decorator API in action https://github.com/Microsoft/vscode-extension-samples/tree/master/decorator-sample

The primary reason for not allowing direct manipulation of the DOM is to improve the speed and stability of the editor.

like image 158
Daniel Imms Avatar answered Oct 28 '25 22:10

Daniel Imms



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!