js 扩展语言IDL 网站

两个 idl 资料:

webidl接口

http://www.w3.org/TR/WebIDL/

webkit 对idl文件的定义:

http://trac.webkit.org/wiki/IdlAttributes


[webkit-dev] How to handle Array types in IDL files?

Sam Weinig sam.weinig at gmail.com
Wed Aug 26 09:26:23 PDT 2009
  • Previous message: [webkit-dev] How to handle Array types in IDL files?
  • Next message: [webkit-dev] How to handle Array types in IDL files?
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Making this JS only for now seems fine.  If we want to enable MessagePorts
for other binding languages we can define the mapping ourselves.  For
example, for a sequence, the clear mapping for ObjC would be to NSArray*.
-Sam

On Wed, Aug 26, 2009 at 5:03 PM, Drew Wilson <atwilson at google.com> wrote:

> To be more precise, the HTML5 IDL defines the following:
>
> typedef sequence<MessagePort> MessagePortArray;
>
>
> The types above are all MessagePortArray in the spec, not Array. So it
> seems like the intent is that they should indeed get mapped to a vanilla JS
> Array.
>
> I could make these attributes JS-only - that shouldn't be a huge issue
> since MessagePorts are currently only enabled for JS anyway (MessagePort is
> an empty interface for ObjC). Is that acceptable? Sam?
>
> -atw
>
> On Wed, Aug 26, 2009 at 12:34 AM, Cameron McCormack <cam at mcc.id.au> wrote:
>
>> Maciej Stachowiak:
>> > We probably need special support for Web IDL array types in the
>> > bindings generator. Sam can probably comment n more detail. As a
>> > stopgap, we could make the relevant IDL attributes be JS only. I
>> > would check out what Web IDL says about Array - I don't think it's
>> > supposed to be reflected as just a vanilla JS Array.
>>
>> Currently Web IDL says that when getting an attribute of type
>> sequence<T>, a new JS Array object is returned.  For array types,
>> T[], a host object with particular [[Get]] and [[Put]] behaviour is
>> meant to be used, which makes it similar to a native Array.
>>
>> Both of these things are pretty speculative, and could do with review.
>>
>> --
>> Cameron McCormack ≝ http://mcc.id.au/
>>
>
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>

你可能感兴趣的:(js 扩展语言IDL 网站)