Re: IDL: number types

On Thu, Mar 21, 2013 at 12:03 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

>
>
> Put another way, I'm 100% sure that I can pass arguments to jquery that
> will corrupt its internal state in interesting ways.


If you have a 100% provable test case, please file bugs at
http://bugs.jquery.com



> But the jquery authors frankly don't care if I do, because the only
> consequence is that other scripts on that same page won't work right.


This is actually not true and borderline libelous. Again, if there are
concrete bugs that you're aware of, file them here http://bugs.jquery.com.



>  Do you know of JS libraries that expose the forms of overloads that are
>> expressible in WebIDL?  They are awkward to express in pure JS.
>>
>
> jQuery.protototype.init.
>
> jQuery's parseHTML (see the 'context' argument in jQuery 1.9.1).
>
> jQuery's each (see the "arraylike or not" overloading).
>
> jQuery's makeArray (overloads a string and an array, treating a string as
> a single-element array internally).
>

> I'm about 10% into jQuery, and I'm sure I've missed a few above that
> point, and I'm also sure there are tons more further on.
>
> I agree that the resulting code is somewhat awkward, of course.  But if
> that's the API you want to expose....


I'd be interested in seeing jQuery's API overloads exposed as WebIDL.


Rick

Received on Friday, 22 March 2013 02:59:23 UTC