Re: Updates to File API

2010-05-13 Thread J Ross Nicoll
On 13 May 2010, at 13:27, Arun Ranganathan wrote:

 Greetings WebApps WG,
 
 I have updated the editor's draft of the File API to reflect changes that 
 have been in discussion.
 
 http://dev.w3.org/2006/webapi/FileAPI
 
 Notably:
 
 1. Blobs now allow further binary data operations by exposing an ArrayBuffer 
 property that represents the Blob.  ArrayBuffers, and affiliated Typed 
 Array views of data, are specified in a working draft as a part of the WebGL 
 work [1].  This work has been proposed to ECMA's TC-39 WG as well.  We intend 
 to implement some of this in the Firefox 4 timeframe, and have reason to 
 believe other browsers will as well.  I have thus cited the work as a 
 normative reference [1].  Eventually, we ought to consider further read 
 operations given ArrayBuffers, but for now, I believe exposing Blobs in this 
 way is sufficient.

Why remove the 'type' attribute from the File? Specifically, is there a real 
issue with duplicating the information in both the File and the Blob? Two main 
concerns:

Without 'type' in the File attribute, you have to read the file to understand 
what's in it. This means that if you want to, for example, produce a 
confirmation dialogue for the user before reading a file, it's very limited in 
how much information it can show (I also think it would be a good idea to have 
'size' as an attribute on the File, for related reasons).

At the moment, if a directory is been dragged and dropped into Firefox, the 
only way to spot this appears to be the 'type' attribute (which is empty). 
Unless I'm missing something, as written this would appear to mean the JS has 
to try reading a directory, get a Blob back (which Firefox does do, at least) 
and then it can find out it didn't actually read a file.



Looking at synchronized file reading... would it perhaps make more sense to 
have readAsBinaryString(), readAsText() and readAsDataURL() as methods on the 
File, rather than a specific separate interface (FileReaderSync)?




Re: Updates to File API

2010-05-19 Thread J Ross Nicoll

On 19/05/10 08:00, Darin Fisher wrote:


It doesn't seem too late to change the name.  FF could support both
FileReader and BlobReader.  One could just be an alias for the other.
  It seems like we have situations like this frequently when it comes to
new web platform APIs.  A name only becomes immutable once there is a
lot of content using it since user agents would be compelled to support
the existing name for compat with existing content ;-)


I would agree with this; the name in the specification should be 
whatever makes most sense, not the name that has been used in a draft 
implementation. I also think it's perfectly reasonable to expect content 
using the draft API to be updated over a relatively short period of time 
(meaning I would not expect Firefox to handle both names for more than a 
year or two).




Re: From-Origin FPWD

2011-07-22 Thread J Ross Nicoll
In my opinion, we should not be supporting X-* headers any more than
absolutely necessary, so phasing out X-Frame-Options in preference of
From-Origin would be the correct way to go. I'm aware this does mean a
cross-over period where servers are likely to have to provide both
headers, and it might be worth specifying what is expected if both are
present and conflict (use From-Origin in preference to X-Frame-Options,
perhaps).

Ross

On 22/07/2011 16:08, Anne van Kesteren ann...@opera.com wrote:

Hi,

The WebApps WG published the From-Origin header proposal as FPWD:

   http://www.w3.org/TR/from-origin/

The main open issue is whether X-Frame-Options should be replaced by this
 
header or should absorb its functionality somehow.

Cheers,


-- 
Anne van Kesteren
http://annevankesteren.nl/