Tucker M.
Tucker M.

Reputation: 23

Accessing the editor's DOM in a Visual Studio Code extension

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

Answers (1)

Benjamin Pasero
Benjamin Pasero

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

Related Questions