Re: Capture API question

Hi Thomas,

On Monday, June 21, 2010, Thomas Roessler <tlr@w3.org> wrote:
> On 21 Jun 2010, at 21:22, Arun Ranganathan wrote:
>
>>> While we're on that one, what are the reasons to overload MIME syntax in @accept instead of adding a separate attribute that triggers a relevant sensor, when present?
>>>
>>
>> Minimizing attributes is nice; I don't think this is overloading. Rather, by including @accept in the first place, we may have all that we need.
>
> I agree on the minimization goal.  But Andrei's proposal adds a pseudo MIME parameter in order to save an HTML parameter. That sounds weird.
>
>> At the risk of bikeshedding, what is your proposal, and why is it better?
>
> Add "capture" as an attribute to "input" (I thought of 'source', but that's much too close to 'src' for comfort).  Same values as for Andrei's pseudo-attribute.
>
> Better because:
> - doesn't add yet another micro syntax (including pseudo-attribute notion) to HTML
> - the "capture" parameter is easily available within the DOM
> - clean fall-back for user agents that might do something useful with the current accept parameter (does anybody actually use it right now?)
>

We did think about adding an attribute but considered that the source
param is nicer because of the same reason as the one Arun mentioned.

Thanks,
Andrei

>> Currently, it seems we have Andrei's proposal:
>>
>> <input type="file" accept="image/*;source=camera">  [1]
>
> <input type="file" accept="image/*" capture="camera">
>
>> Upon reflection, I'm not sure if we even need the extra ";source=camera" part.  Our implementation doesn't use it, and thus we have the existing use of @accept which seems sufficient.  Andrei, do you think we actually need the additional qualifier?  If so, why?
>
>
> (Good question; I wouldn't mind dropping the qualifier.)
>
>

Received on Monday, 21 June 2010 20:19:47 UTC