Menu

#132 Allow the client to specify CSS error handler

closed
None
5
2012-10-21
2008-08-21
No

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.

Discussion

  • Marc Guillemot

    Marc Guillemot - 2008-08-22

    Logged In: YES
    user_id=402164
    Originator: NO

    +1

    But I wouldn't make it static, it should be a per instance configuration.

     
  • Daniel Gredler

    Daniel Gredler - 2008-09-12

    Fixed in SVN, see WebClient.setCssErrorHandler(), WebClient.getCssErrorHandler(), DefaultCssErrorHandler and SilentCssErrorHandler.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.