Options
ClearResults removes styles from HtmlHead
Hello!
When using Util.HtmlHead.AddStyles
, LINQPad will remember the injected HTML header content so that repeated calls with the same string will not result in duplicated injections. This is all good and works pretty well.
However, when using Util.ClearResults()
to clear the results panel, these injected styles are also removed and even if you have calls to AddStyles
, the styles are still not readded (since they are still cached).
Here’s a quick example:
Util.HtmlHead.AddStyles(".test { color: red; }"); Util.WithCssClass("Test!", "test").Dump(); Util.ClearResults(); Util.HtmlHead.AddStyles(".test { color: red; }"); Util.WithCssClass("Test!", "test").Dump();
It would be nice, if this could be modified that either ClearResults
will readd the cached injected headers or that it will clear the cache so that later calls to AddStyle
can readd the headers.
Comments
Ctrl+Alt+X
andF5
produce different results. MultipleF5
s are inconsistent when executed afterCtrl+Alt+X
. LINQPad 8 Windows beta.