How to display a website in a theia tab from an extension?

Hi, I’m just starting with Theia and just want to experiment / develop simple extensions to better understand how it works. So sorry for the newbies question: I would like to display in a new tab a external website (For instance I would like to display google homepage in a new tab). I succeeded to do it in a plugin (via a new command which is creating a webview panel rendering an iframe on google), but I don’t figure out how to do it in an extension. Starting from ‘yo theia-extension widget’ sample, currently my extension is adding a widget in the side bar. My widget contains a simple button, and I want to open the new tab on button click but don’t find how to do it. I would really appreciate to get some help. Thanks.

[original thread by Thierry Le Gal]


Check this answer i got, maybe it can help you out:

[Thierry Le Gal]

Thanks for your help, this was the info I was looking for. It works now using mini-browser extension.


Hi @thierry-le-gal , you can set your custom widget in a tab by set set " defaultWidgetOptions: { area: ‘main’ }," . This code in constructor of your xxxContribution. Also, you can reference the “getting started extension”.

You sure be aware though that many websites are not allowing embedding by using CSP policies (

i.e. the mini-browser is not suitable for generic browsing, but more for previewing code