Re: [File API] Draft for Review

On Thu, 26 Jan 2012 22:54:39 -0600, Glenn Maynard <glenn@zewt.org> wrote:

> On Thu, Jan 26, 2012 at 10:45 PM, Mike Taylor <miket@opera.com> wrote:
>
>> As someone who occasionally has to look up if the 3rd argument to
>> XMLHttpRequest.open() means sync or async, I agree with Tab. And that's
>> something I've been using for years. Forget about synthetic keyboard  
>> events
>> [1]:
>>
>> event.initKeyEvent("keypress", true, true, null, null, false, false,
>> false, false, 9, 0);
>>
>
> This is showing exactly my point: the null, 9 and 0 arguments are just as
> mysterious as the boolean arguments.  It's hard to understand because  
> there
> are too many arguments, not because they're boolean.

Yes, synthetic keypress have multiple problems--which is why we all use  
libraries to not have to author them by hand.

Regardless, this doesn't change the fact that  
window.URL.createObjectURL(file, true) is more opaque (and for me, harder  
to remember) than:

window.URL.createObjectURL(file, {oneTimeOnly: true})

or something magical like window.URL.createObjectURL(file).oneTimeOnly()

Cheers,

-- 
Mike Taylor
Opera Software

Received on Friday, 27 January 2012 05:10:15 UTC