In com.gargoylesoftware.htmlunit.javascript.host.Stylesheet, the code always refers to the singleton CSS_ERROR_HANDLER for CSS related warnings and errors.
It would be nice if I can specify my own error handler. When you use 3rd party CSS (like YUI), it contains a lot of warnings and errors that I don't intend to fix, so I'd rather like to mask that, and the easiest way to do that is to specify my own.
The simplest solution is to make this field public static non-final, but if this object can access WebClient and I can set it there, that would be even better.
Logged In: YES
user_id=402164
Originator: NO
+1
But I wouldn't make it static, it should be a per instance configuration.
Fixed in SVN, see WebClient.setCssErrorHandler(), WebClient.getCssErrorHandler(), DefaultCssErrorHandler and SilentCssErrorHandler.