W3C home > Mailing lists > Public > public-media-capture@w3.org > May 2014

Re: Possible Constraint Syntax Compromise

From: cowwoc <cowwoc@bbs.darktech.org>
Date: Wed, 21 May 2014 08:16:31 -0400
Message-ID: <537C991F.2060701@bbs.darktech.org>
To: public-media-capture@w3.org
That's a terrible idea.

Do you how annoying it is for an application to fail silently because of 
a typo in the code? If someone listed a property name on require but 
forgot to include the corresponding constraint then it should be flagged 
as an invalid constraint and throw an error. We should aim for fail-fast 
behavior as much as possible.


On 21/05/2014 7:11 AM, Jim Barnett wrote:
> Yes, as we understand it, the UA will never see the unknown constraint and so the constraint will 'succeed' without having any effect. (The unsupported constraint won't show up on Settings or currentConstraints.) We decided that this was an acceptable price to pay for getting rid of the separate 'require' element, which had plenty of oddities of its own. What if someone listed a property name on require but forgot to include the corresponding constraint?
> Jim Barnett
> Genesys
>> On May 21, 2014, at 6:50 AM, Dan Burnett <dburnett@voxeo.com> wrote:
>> Jan-Ivar might want to comment here, as he has often explained that Firefox does its parsing based on WebIDL and that an unknown constraint disappears during that process.  As our standard list of constrainable properties becomes more and more supported the need to check in advance for such unknown constraints should also diminish, unless of course the developer is specifically using a non-standard (e.g., experimental) constraint.
>> -- dan
>>> On May 20, 2014, at 9:16 PM, Timothy B. Terriberry wrote:
>>> Peter Thatcher wrote:
>>>> Out of those three, all the people I talked to preferred #3, which is
>>>> why I have proposed it.  If there is something we are all missing about
>>>> WebIDL that gives an easier exit from this conundrum, that would be
>>>> welcome news.
>>> No, it does not surprise me this is not expressible in WebIDL, so I guess it will not throw an exception. But we're still required by contract to call either the success or error callback, and what it sounded like you were saying was that the browser was free to ignore the constraint completely and return success.
Received on Wednesday, 21 May 2014 12:17:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:27 UTC