-
I have tried adding secondary window support to my custom widgets. It was pretty straight forward to get the base funtionality working by implementing ExtractableWidget. However, all my custom styles are missing in the secondary window and I am having trouble finding out what needs to be done to get those loaded. Do my CSS files have to be registered with some service or similar? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
@tsmaeder If I remember correctly, you have been struggling with this as well. Can you recommend something? |
Beta Was this translation helpful? Give feedback.
-
Seems related but may not reflect current state of things: #11643 (comment) |
Beta Was this translation helpful? Give feedback.
-
If you add the following to your theia extensions, it will include the CSS reachable from the mentioned module in the secondary window:
From there, it's a question of your widget being able to live in one window, but having it's html in another: There are a couple of caveates, for example, you cannot use the global |
Beta Was this translation helpful? Give feedback.
If you add the following to your theia extensions, it will include the CSS reachable from the mentioned module in the secondary window:
From there, it's a question of your widget being able to live in one window, but having it's html in another: There are a couple of caveates, for example, you cannot use the global
window
object, since that is the original window, or the HTML Element classes are per Windows, so "instanceof" with the class name will not work for html elements in the secondary window. With a bit of luck, though, your widget will "just work".