document not defined error
September 25, 2019 at 4:33amdocument not defined error
September 25, 2019 at 4:33amI am getting document not defined error when i am using,
document.getElementById
I have included "dom" inside package.json lib.
September 25, 2019 at 4:34am
You can only access DOM in browser context, i.e. from frontend extension entry module. It is not accessible from backend entry points or VS Code extensions (Theia plugins).
I am also getting navigator is not defined error
Plugins are never running in the main browser process, either in web worker or in Node.js process. Both don't have access to DOM.
You can use webviews of VS Code extensions to integrate iframe in Theia or create a native Theia extension to have access to the DOM of main window.
thank you
May i know how to access plugin from other extensions?
can i have any sample code to see how to use?
September 26, 2019 at 1:09am
Only VS Code extension can access another VS Code extension apis, native Theia extensions don't have access to them.
September 26, 2019 at 11:39am
Thank you