Reputation: 23
Is it possible to access the DOM in a VSCode plugin, to manipulate the interface elements?
For example, hiding the left sidebar with the Explore, Search, Git, and Debug icons.
Upvotes: 2
Views: 2508
Reputation: 123824
An extension cannot directly modify the DOM. Please see https://code.visualstudio.com/docs/extensions/our-approach for more information on our approach for extensions.
See also the https://code.visualstudio.com/api/extension-capabilities/overview page, which states:
However, we also impose restrictions upon extensions to ensure the stability and performance of VS Code. For example, extensions cannot access the DOM of VS Code UI.
Upvotes: 2