- From: Marcos Caceres <marcosc@opera.com>
- Date: Wed, 17 Jun 2009 17:54:34 +0200
- To: Scott Wilson <scott.bradley.wilson@gmail.com>
- Cc: public-webapps <public-webapps@w3.org>
Hi Scott, On Fri, Jun 12, 2009 at 1:54 PM, Scott Wilson<scott.bradley.wilson@gmail.com> wrote: > One scenario for hasFeature(): > 1. I install a Widget with: > <feature name="http://my.feature.com/x" required="false"/> > 2. In my Widget's JavaScript, I have something like: > if (hasFeature("http://my.feature.com/x")){ > doCoolThing(); // great, we have the X API! Lets use it > } else { > doLessCoolThing(); // ok do something that doesn't need the X API > } > How can this be realised if hasFeature() is removed? Or should this UC be > specifically out of scope for A&E? For example, would I have to create two > different widgets, one with X and one without? During the F2F, we dropped the feature because it was too problematic. As Henri Sivonen pointed out, it is easy to say a feature is available but not have it fully implemented. Other means of testing for the availability of a feature will be required (like testing if an object is available in JS, etc.). The WG will not be defining what those methods are, however. > Without hasFeature(), what does P&C <feature ... required="false"> mean? The definition given in the spec still holds. hasFeature() and the semantics of the feature element and its attributes are orthogonal. -- Marcos Caceres http://datadriven.com.au
Received on Wednesday, 17 June 2009 15:55:39 UTC