W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2009

bug in example

From: (wrong string) 余仕斌 <bsy@google.com>
Date: Wed, 4 Nov 2009 17:04:20 -0800
Message-ID: <1c54f9440911041704v3bb3bb2fm3b5ecdfd4f808f99@mail.gmail.com>
To: public-webapps@w3c.org

my apologies in advance if this has already been noted.  i recently
was introduced to  http://dev.w3.org/2006/webapi/FileAPI/ and noticed
that the first example appears to have the following race condition:
in getAsText, reader.readAsText occurs before any event callbacks are
set, so if the completion occurs after read.readAsText(...) and
reader.onprogress = ..., .onload = ... etc, then no callbacks will
ever get called.  or am i misunderstanding the way the callbacks are
supposed to work -- i.e., they're level triggered and not edge
triggered?  (i'd imagine onprogress shouldn't be level triggered.)

bennet s yee
i usually don't capitalize due to mild tendonitis
Received on Thursday, 5 November 2009 16:09:57 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:20 UTC