Re: DOMParser RFE issues
Jonas Sicking <[email protected]> Thu, 13 Jul 2006 20:30:38 -0700
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Message-ID | <[email protected]> |
Robert Sayre wrote: > Jonas Sicking wrote: >> >> 2. Make the default action of error-events be to log the error to the >> console. This way if scripts handles the event and calls >> .preventDefault() on them we will not log. >> >> I like the second solution best, but it doesn't quite work for the >> sax-reader since it doesn't have error-events. But we could do >> something similar even for SAX. > > I don't see the use case for SAX console writing. SAX does provide its > own error event, via the ErrorHandler interface. I'd rather the > consuming application do the logging. > > So far, none of the SAX use cases need/want console logging, and it > would be actively harmful in Thunderbird, where a whole sidebar full of > feeds can get refreshed at once. I think the right thing to do for SAX is to use the error-handler if one is provided, but report to the console if no error-handler was set. This should prevent thunderbird from getting swamped, while making sure that someone that doesn't consider errors will get warnings somewhere. / Jonas