est-2/#the-open-method
Suggested values would be SYNC/ASYNC matching the spec's "async" boolean name,
or the longer SYNCHRONOUS/ASYNCHRONOUS.
Is this something that would be considered, or is it so easy for authors to
make it clear, with comments or variable names, that it is not worth it? Maybe
I just need to remember what that boolean means!
- Joseph Pecoraro
On Feb 18, 2010, at 4: 31AM, Jeremy Orlow wrote
> Very interesting. The general concept seems promising and fairly flexible.
> You can easily code in a similar style to normal async/callback semantics,
> but it seems like you have a lot more flexibility. I do have a few questions
> though.
>
see
>> many developers getting caught forgetting send() and getting
>> weird, unexpected errors / behavior across different implementations.
>
> This was clarified in the proposed WD.
The new text is much clearer. Thanks!
- Joseph Pecoraro
pulate the
otherwise readonly pendingUpdates attribute of ApplicationCache2 to
"provide some idea [...] as to how large the dirty data has become".
If that is the case, then it would be useful to have a number value
that is persistent that you can easily adjust.
I have a feeling that changes by 1 may be overly restrictive, but
I will wait for usage feedback. It may be that increment / decrement
operations work very nicely with the rest of the API.
Thanks for the clarifications and fixes for the other issues.
- Joseph Pecoraro
Some driveby comments. There were a lot of changes, but these were
just what I caught with a quick scan. I can see you've put a lot
of work into this, Thanks!
General
- 4.1 Introduction
http://dev.w3.org/2006/webapi/DataCache/#datacache-intro
review policy says "(only for unsaf
s, which
>> reuse the current cache, and never fire "onFetching".
>
> This event is no longer used.
Sounds good. I couldn't come up with a use for it.
>> Also, are new APIs switching to camel case for event handler
>> attributes? I've always seen them all lowercase.
>
> That was a typo and has been corrected.
Thanks.
Joseph Pecoraro
en be:
response.delay(); // explicitly saying, wait for the send()
// trigger async action
setTimeout(function() {
// do work...
response.send();
}, ...);
I just bring that up for discussion purposes. I am fine with
always explicitly calling send().
[1]: http://docs.jquery.com/QUnit
Joseph Pecoraro
widl-CacheTransactionRequest-decrementPendingUpdates
- ApplicationCache2Request-openModifiedItemCursor
This seems like an important concept for synchronization!
http://dev.w3.org/2006/webapi/DataCache/#widl-ApplicationCache2Request-openModifiedItemCursor
- Registering an event listener, for one of the CacheEvent's.
This would clarify Cache Host registration.
Joseph Pecoraro
There are a number of new event handlers on the DataCache interface:
http://dev.w3.org/2006/webapi/DataCache/#async-datacache-interface
Before (and still) tasks are queued at the cache host level (document)
and can be caught like so:
// Handle any cache events
document.addEventListener('fetch
> I have changed to using the new method "immediate" and that also removed this
> call.
Immediate looks useful. The specification for immediate is:
[[
When this method is called, the user agent creates a new cache transaction, and
performs the steps to add a resource to be captured in that cac
There is no way to remove a handler, or all handlers for a particular
namespace, after some have been registered. However, this may be a
valid design decision, because there probably aren't compelling use
cases for removing or replacing handlers. The only time I ran into
this need was running multi
ache host is 1-to-1. I am inexperienced
with Workers, but I overheard there might be a WorkerNavigator interface soon.
Can this be clarified?
Thanks,
Joseph Pecoraro
>> - 4.2.7. Transaction API
>> http://dev.w3.org/2006/webapi/DataCache/#transaction-interface
>> Extra whitespace for the "oncommitted" event.
>>
>> [[
>> IDL
>> interface CacheTransaction {
>> void getItem(in DOMString uri, ItemCallback callback);
>> void release(in DOMString uri);
>> void
>> - 4.2.2.1. Starting a transaction - Rules should be switched.
>> http://dev.w3.org/2006/webapi/DataCache/#starting-a-transaction
>>
>> first arm: (these should be swapped)
>> 3.3 - Mark transaction as off-line.
>> 3.4 - Create a new cache transaction called transaction and set data cache
>
happens in the case where you do not issue a
commit()? Again, I feel it should implicitly commit() the transaction. In
which case the commit() could be left out and potentially removed.
Thanks,
Joseph Pecoraro
Again the examples seem out of date. I'll update the remaining examples. Sorry
for not consolidating all of them into one email!
- 4.1.1. Examples
http://dev.w3.org/2006/webapi/DataCache/#examples
The second example seems to be out of date for a number of reasons.
[[
var uri = ...
var cache
orted
I would expect the status to be set as committed as the last step in the
"Complete a Transaction":
http://dev.w3.org/2006/webapi/DataCache/#complete-transaction
That would add the following to the list:
- Complete a Transaction: set as committed
Cheers,
Joseph Pecoraro
- 4.3.2. Changes to the networking model
http://dev.w3.org/2006/webapi/DataCache/#networking-model-changes
There are a couple cases I expected to see in the networking changes.
1. There are two branches to Step 10 for off-line and online handling. Both
start with:
[[
10.1 Select an `embedded s
;ready' or a
better name
I would have expected the example to look more like the following:
var uri = ...
var cache = window.openDataCache();
window.addEventListener('cache-ready', function(event) {
event.cache.swapCache();
... // take advantage of the new stuff in the cache
});
cache.transaction(function(txn) {
txn.capture(uri);
txn.commit();
});
Cheers,
Joseph Pecoraro
Some more DataCache API Corrections:
- 4.1.1. Examples
http://dev.w3.org/2006/webapi/DataCache/#examples
No such thing as finish() used in the first example. Perhaps this should be
commit()?
[[
cache.transaction(function(txn) {
txn.capture(uri);
txn.finish();
});
]]
- 4.2.2.2.
rk transaction as not off-line.
3.5 - Create a new cache transaction called transaction and set data cache
to be its data cache.
- 4.2.5 Asynchronous Data Cache API typo three times:
http://dev.w3.org/2006/webapi/DataCache/#cache-status
"This DataCache object's cache host is aassociated with a..."
s/aassociated/associated/; // 3 times
Cheers,
Joseph Pecoraro
http://dev.w3.org/html5/webstorage/#the-storage-interface
Web Storage how to check for support?
How can one in a script check for UA support?
How about either of the following, they both worked as expected for me.
// Check for the Storage interface
if (window.Storage) { ... }
// Check f
22 matches
Mail list logo