I want to add a widget that will rely on styling. Primarily to add all sorts of icons. I want the style to be shared across widget uses (across tiddlers), so should be in the head element (right?) but, I want it there only when the widget is used. That is, at least one tiddler that contains the widget is open. When no such tiddler is open, I don’t want the style to be part of the DOM, to conserve memory
Is there a way to achieve that? Seems like it requires some sort of reference count of widget instances.