W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2008

[whatwg] HTML5 Offline Web Applications

From: Michael Nordman <michaeln@google.com>
Date: Wed, 8 Oct 2008 11:51:30 -0700
Message-ID: <fa2eab050810081151w2e974a4cm9588768e05b22d5@mail.gmail.com>
> Here's the thing i'm trying to avoid in section 5.7.6 where it
> discusses the add(url) method.
> ...
> 8. "Wait for there to be no running scripts, or at least no running
> scripts that can reach an ApplicationCache object associated with the
> application cache with which this ApplicationCache object is
> associated."
> ...
> The same system-wide synchronization has to be applied for the
> remove(url) method.
>
> The utility of the .length and .item(indx) method could be provided in
> such a way that this awkwardness could be avoided.
>
> Some ideas...
> bool contains(url);
> string[] getItems();

Another idea, getItems() wouldn't work well with very large collections

void forEachItem(callback);  // iteration terminates if the callback
returns false or throws
Received on Wednesday, 8 October 2008 11:51:30 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:06 UTC