Thanks to everyone in advance -
I took a look at this -
An observer for page loads in a custom xul:browser
I am guessing that might be a path for determining the HTTP status code, but does anyone know of an easier way? I have flipped through the contentDocument as well...no dice.
Any ideas?
Thanks,
Sam
I looked for a bit and I don't think there is an easier way. The HTTP status code is an attribute of a request (and only of an HTTP request), so it appears to die with the request object (nsIHttpChannel), since nothing cares to save it.
You might be interested in this Firefox project, by the way: https://wiki.mozilla.org/Firefox/Projects/Network_Error_Pages
精彩评论