Home

Output is randomly empty when using custom CSS

I have noticed that sometimes the output is empty when trying to use custom CSS or trying to use a linked CSS (for example bootstrap).

For example consider the following script

void Main()
{
    SetupBootstrap();
    Display(new
    {
        SomethingSomething = "Dark Side"
    });
}

public void Display<T>(T response)
{
    response.Dump();
}

public void SetupBootstrap()
{   
    Util.HtmlHead.AddCssLink("https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css");
    Util.HtmlHead.AddCssLink("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css");
    Util.HtmlHead.AddScriptFromUri("https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js");
}

This sometimes yields the object dumped as expected but sometimes returns an empty page.

On the empty page if I try to inspect the output itself I can actually see that the only content on the body is

<div id="final"></div>

Note : I have mostly seen this on my work computer and only once or twice on my personal computer so I'm wondering if it's something on the machine setup rather than linqpad itself.

Comments

Sign In or Register to comment.