WidgetResource

Hi
I am looking around for a good way to fetch a resource defined in a widgetset public path. I have noticed that ThemeResource is implemented with a “theme://” protocol in uidl.

I think it would be nice to have a additional resource named WidgetResource which could be used to fetch resources from the current widgetset with the protocol “widget://”.

Further more I am wondering why the ClassResource , FileResource and StreamResource needs the application in the constructor. Could this assignment not be done in the terminals JsonPaintTarget and thereby free the concerns about getting a reference to the application during creation of the resource?

Is there a way to fetch a URL for the current widgetset as a workaround for loading resources from a widgetset?

TIA
Kasper