I'm getting 'text/plain' for everything except the image files. I just added this:

Code:
if TPath.GetExtension(aURL) = '.js' then
    aMIMEType := 'application/javascript';
Still get those errors.

Interestingly, if you do this: WebBrowser1.Navigate('file:///' + TPath.Combine(TPath.GetDirectoryName(ParamStr(0)), 'HTML\index.html')), it all works as expected. So the Twebbrowser component can execute the javascript, there is something missing here that we need to do when running it through the protocol handler.

I've been goodling/bing'ing for hours, trying different things.... nothing so far. Sigh.