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

[whatwg] HTML5 Offline Web Applications

From: Michael Nordman <michaeln@google.com>
Date: Tue, 14 Oct 2008 11:07:06 -0700
Message-ID: <fa2eab050810141107gc4fd3ddxf528044409cff102@mail.gmail.com>
Another way to address this would be to redefine the semantics of .length
and .item(indx) such that the underlying collection was not required to
appear immutable till scripts ran to completion. Embrace the fact that
the collection is shared across many pages and that it can change at any
time. A .lastModifiedDate property could be exposed which would allow
pages to detect when a change had occurred.

On Wed, Oct 8, 2008 at 11:51 AM, Michael Nordman <michaeln at google.com> wrote:
>> 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 Tuesday, 14 October 2008 11:07:06 UTC

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