Re: [whatwg] [Canvas][WebIDL] Canvas .addText takes NoInterfaceObject argument

On Jul 3, 2013, at 7:17 AM, Ian Hickson <ian@hixie.ch> wrote:

> On Tue, 2 Jul 2013, Dirk Schulze wrote:
>> 
>> The methods addText() and addPathByStrokingText() [1] take the 
>> NoInterfaceObject CanvasDrawingStyle [2] as argument. I wonder if that 
>> is even possible for WebIDL since there is no way to create it and no 
>> binding to ECMAScript is exposed. Shouldn't it rather be a DrawingStyle 
>> object[3], which indeed is an interface? I didn't scan if that is the 
>> case in other places as well. The definition of NoInterfaceObject is 
>> here [4].
> 
> On Wed, 3 Jul 2013, Boris Zbarsky wrote:
>> 
>> [NoInterfaceObject] just means that window.CanvasDrawingStyle is 
>> undefined, basically.  It doesn't affect anything else.
>> 
>> addText, as an example, takes any object that implements the 
>> CanvasDrawingStyle interface.  That would include any DrawingStyle 
>> object and any CanvasRenderingContext2D object, at first glance.
> 
> Boris is correct.

Thanks for the clarification.

Dirk

> 
> -- 
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 3 July 2013 15:51:29 UTC