[whatwg] Need more diagnostic information for ApplicationCache events

I've been playing with application cache for a while now, and
found the diagnostic information available to be sorely
lacking.

For example, to diagnose user-land errors that occur when using
appcache, this is the only practical tool I have at my disposal:

    tail -f /var/log/apache2/access_log /var/log/apache2/error_log

I'd like to be able to get the following information:

- during "progress" events, as identified in step 17 of the application
cache download process steps in 6.6.4  "Downloading or updating an
application cache"), I'd like to have the URL of the resource that
is about to be downloaded.  The "progress" event from step 18 (
indicating all resources have been downloaded) doesn't need this.

- for all error conditions, some indication of WHAT error occurred.
Presumably an error code.  If the error involved a particular resource,
I'd like the URL of the resource as well.

I'm not sure what the best mechanisms might be to provide this info:

- extend the events used to add this information

- provide this information in the ApplicationCache interface -
lastErrorCode, lastResourceDownloaded, etc

- define a new object as the target for these events (currently
undefined,or at least not clear to me), and add that info to the target

- something else

In terms of cleaniness, I'd prefer the third, I think, which would imply
creating a new interface perhaps called ApplicationCacheStatus or 
something.

Actually, creating a new interface to hold this sort of information
might be the best thing to do for all three of the mechanisms I
suggested - extend the events used with a new attribute of type
ApplicationCacheStatus, and add a new attribute to ApplicationCache
of type ApplicationCacheStatus, etc.

-- 
Patrick Mueller - http://muellerware.org

Received on Wednesday, 19 May 2010 08:26:24 UTC