Re: [widgets] What does it mean to have an unavailable API

I think in such a case the UA should not be expected to make frob()  
available, and the Widget should not expect frob() to be present.

For example, in the Shindig opensocial runtime, client JS is injected  
based on the <require> elements of the gadget. If it isn't declared,  
it isn't injected, and if you try calling those functions they just  
aren't there.

What this does make less clear for me is in W:A&E why you'd ever want  
to call "hasFeature()"?

S


On 2 Jun 2009, at 13:51, Henri Sivonen wrote:

>>
>> Ok. I see what you mean. Widget.hasFeature has slightly different  
>> semantics (in widgets, it means "did that feature I requested load  
>> and become available?"
>
> Which brings up the issue that it's unclear what it means for an API  
> to have latent support but not having been activated with <feature>.
>
> If a widget UA has an implementation for window.frob() and frob()  
> requires <feature> activation, what should happen when frob() hasn't  
> been activated with <feature>? Should there be no function object  
> for frob()? Or should it be there but throw upon calling? Or  
> something else.
>
> Please specify this.
>
> -- 
> Henri Sivonen
> hsivonen@iki.fi
> http://hsivonen.iki.fi/
>
>
>

Received on Tuesday, 2 June 2009 13:18:12 UTC